Skip to content

Truncated data #10

@ibab

Description

@ibab

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions