Skip to content
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

Merged
merged 2 commits into from
Mar 13, 2016
Merged

FlatGrenander π0 estimator #9

merged 2 commits into from
Mar 13, 2016

Conversation

juliangehring
Copy link
Owner

Implements the longest constant interval in the Grenander estimator for π0, according to the description in Langaas et al., 2005 (#3).

@nignatiadis
Copy link
Contributor

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?

@juliangehring
Copy link
Owner Author

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.

@nignatiadis
Copy link
Contributor

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.

@juliangehring
Copy link
Owner Author

Would be happy to have your feedback on this - I suspect that there may still be some uncovered edge cases...

@nignatiadis
Copy link
Contributor

Yes will do so! Btw how does it compare in our simple benchmark notebook?

@juliangehring
Copy link
Owner Author

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.

@nignatiadis
Copy link
Contributor

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]
Copy link
Contributor

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

Copy link
Owner Author

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.

@juliangehring
Copy link
Owner Author

@nignatiadis Do you have any comments on the new, fixed version? From my side, it looks good.

@nignatiadis
Copy link
Contributor

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 p = [0.0; p], maybe that should be done already in grenander rather than the pi0 estimator). But I don't think this would lead to any noticeable changes and we can do this later.

@juliangehring
Copy link
Owner Author

Especially having the Grenander estimator as a independent, exported feature would be a great - but this looks like work for another day.

@nignatiadis
Copy link
Contributor

Yeah -- in fact it might also be something that should be in a distinct package.

@juliangehring juliangehring force-pushed the grenander branch 2 times, most recently from 6731bc3 to 5675bd6 Compare March 13, 2016 18:58
- 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.
juliangehring added a commit that referenced this pull request Mar 13, 2016
@juliangehring juliangehring merged commit 22b68b7 into master Mar 13, 2016
@juliangehring juliangehring deleted the grenander branch March 13, 2016 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants