-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatGrenander π0 estimator #9
Conversation
That's really cool :). Will try to review during the weekend. On first note, do we want to have the isotonic function here? Or just try to get the isotonic.jl package functional again and send a pull request there with our test cases and then just import it? |
For the moment, I suggest we keep the two internal versions of the isotonic regression within the package, for tweaking and testing. We can then later try to feed our changes back to Isotonic.jl. |
Ok, sounds good! I have also been planning to make another big roadmap issue beyond pj0 estimators, maybe I could do it now before going to sleep. |
Would be happy to have your feedback on this - I suspect that there may still be some uncovered edge cases... |
Yes will do so! Btw how does it compare in our simple benchmark notebook? |
The FlatGrenander performs fairly badly in this setting (large variance, large bias), but I first want to make sure that the implementation is working correctly before interpreting this. |
ok, I see. Maybe this is why there is no R implementation of it :P. |
cl = 0.0 | ||
pi0 = 1.0 | ||
for i1 in (length(f)-1):-1:1 | ||
if f[i2] ≈ f[i1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the logic of this should be part of the isotonic function or maybe the Grenander function? i.e. that it has a keyword argument "merge_epsilon" or something like that which merges nearby bins with almost same density
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds very good. I'll look into it next week.
@nignatiadis Do you have any comments on the new, fixed version? From my side, it looks good. |
I think we can merge this now! I also want to rethink the Grenander estimator a bit, esp. regarding its support and how to handle the left or right boundary (things like |
Especially having the Grenander estimator as a independent, exported feature would be a great - but this looks like work for another day. |
Yeah -- in fact it might also be something that should be in a distinct package. |
6731bc3
to
5675bd6
Compare
- Grenander estimator for the ECDF, adapted from Nikos original code, with general test cases - Fast isotonic regression, adapted from Isotonic.jl, with few test cases - Implements the longest constant interval in the Grenander estimator for π0, acoording to the description in Langaas, 2005.
d0a2635
to
456769b
Compare
FlatGrenander π0 estimator
Implements the longest constant interval in the Grenander estimator for π0, according to the description in Langaas et al., 2005 (#3).