stephenslab / ebnm

R package to fit Empirical Bayes Normal Means model.
https://stephenslab.github.io/ebnm/
12 stars 9 forks source link

ebnm_npmle can call ebnm_normal_scale_mix #52

Closed willwerscheid closed 3 years ago

willwerscheid commented 3 years ago

right now it calls ebnm_ash but why not use the faster function

stephens999 commented 3 years ago

using a mixture of normals for npmle is probably slower than just using a discrete grid of point masses? probably worth coding up the discrete grid directly? (in ash i only used the mixture of normals/uniforms to avoid doing the special case....)

willwerscheid commented 3 years ago

good point! i don't think the gains would be terribly significant but it shouldn't be too hard to implement (really 2-3 lines I think). and i think i have to make a couple of changes anyway because ebnm_normal_mix_workhorse previously assumed a scalar "mode" parameter whereas the way this is implemented is like a vector of modes.