-
Notifications
You must be signed in to change notification settings - Fork 244
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
generalize BaldingNichols to PritchardStephensDonnally #3206
generalize BaldingNichols to PritchardStephensDonnally #3206
Conversation
This is pretty awesome. Also, this:
is exactly what I want to write. 👍 |
e6ff453
to
6eb589a
Compare
Yeah, amazing how far the Python interface has come! Here are the essential changes:
|
actually, this is what I want to write, I think:
|
Would it make sense to expose the |
I starting write this and then I noticed you already said it. Hailers are the best. |
A simple but powerful extension requested by @alexb-3 and Christina to allow for synthetic genotypes with very general and realistic-looking PCA plots with [redacted]. Alex pointed out that BaldingNichols is special case of PritchardStephensDonnelly in a degenerate sense, just as one-hot encoded
Categorical(p_1,...,p_k)
is the distributional limit ofDirichlet(a * p_1,..., a * p_k)
asa
goes to 0. So the substantive changes took about 10 lines.It's turned on by the
mixture
parameter which defaults to False and is marked as experimental.True
means treatpop_dist
as the parameters of Dirichlet rather than Categorical. @alexb-3 , it'd be great if you and Christina could experiment with it and extend the documentation accordingly. Once we have that, I'll add tests and remove "experimental". The plots below are already quite convincing.