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

Truncated data #10

Open
ibab opened this issue Jan 26, 2016 · 0 comments
Open

Truncated data #10

ibab opened this issue Jan 26, 2016 · 0 comments
Labels

Comments

@ibab
Copy link

ibab commented Jan 26, 2016

Users should be able to incorporate the fact that their data distribution has been truncated.
Example:

p2 = Trunc(p1, lower=-1, upper=1)

Truncation can occur either by keeping all samples in a certain interval or by throwing them out.
In both cases, the sample space that has been left out needs to be marginalized out in the distribution.
For this, we could use scipy.quad on the top-level pdf, or maybe we can do something more efficient/clever.

Many statistics frameworks will allow you to set limits directly when creating random variates

x1 = variable(lower=-1, upper=1)

where the pdf will then be marginalized over implicitly
This could also be an option here.

Also, we should try to use analytical integrals where possible.
In the 1-dimensional case the cdf() method would need to be defined.
For higher-dimensional distributions we might use a generalization like a box_integral() method.

@glouppe glouppe added the API label Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants