File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/models/continuous_models Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 54
54
55
55
function _merge_point_mass (point:: GaussianPartition , regular:: GaussianPartition )
56
56
r = copy_partition (point)
57
- r. norm_const += log ( gaussian_pdf ( regular, point. mean) ) + regular. norm_const
57
+ r. norm_const += logpdf ( regular, point. mean) + regular. norm_const
58
58
return r
59
59
end
60
60
@@ -74,11 +74,11 @@ function site_LLs(part::GaussianPartition)
74
74
return [part. norm_const]
75
75
end
76
76
77
- function gaussian_pdf (g:: GaussianPartition , x:: Float64 )
77
+ function Distributions . logpdf (g:: GaussianPartition , x:: Float64 )
78
78
if g. var == 0
79
- return Float64 (x == g . mean) # Hokey...
79
+ error ( " logpdf not defined for point mass " )
80
80
end
81
- return pdf (Normal (g. mean, sqrt (g. var)), x)
81
+ return logpdf (Normal (g. mean, sqrt (g. var)), x)
82
82
end
83
83
84
84
# And sampling
You can’t perform that action at this time.
0 commit comments