Skip to content
Snippets Groups Projects

Fixed CDF and PDF for SymmertricLogUniform

Merged Moritz Huebner requested to merge fix_sym_log_unif_cdf into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -361,9 +361,9 @@ class SymmetricLogUniform(Prior):
cdf = np.zeros((len(val)))
lower_indices = np.where(np.logical_and(-self.maximum <= val, val <= -self.minimum))[0]
upper_indices = np.where(np.logical_and(self.minimum <= val, val <= self.maximum))[0]
cdf[lower_indices] = -norm * np.log(-val[lower_indices]/self.maximum)
cdf[lower_indices] = -norm * np.log(-val[lower_indices] / self.maximum)
cdf[np.where(np.logical_and(-self.minimum < val, val < self.minimum))] = 0.5
cdf[upper_indices] = 0.5 + norm * np.log(val[upper_indices]/self.minimum)
cdf[upper_indices] = 0.5 + norm * np.log(val[upper_indices] / self.minimum)
cdf[np.where(self.maximum < val)] = 1
return cdf
Loading