-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Tool to find the distribution of a function of a R.V. #1144
Conversation
I see this being useful as we move toward the representation of models using transition equations. Imagine I'm in period
One could do something like |
@sbenthall could you review? This is heavily inspired on your |
Codecov Report
@@ Coverage Diff @@
## master #1144 +/- ##
==========================================
+ Coverage 73.99% 74.07% +0.07%
==========================================
Files 70 70
Lines 10776 10809 +33
==========================================
+ Hits 7974 8007 +33
Misses 2802 2802
Continue to review full report at Codecov.
|
Yes, I can review this. |
Looks great! Merging now... |
Imagine
x
is aDiscreteDistribution
object and you want to find the distribution off(x)
for somef
.This pr introduces a tool called
distr_of_function
.distr_of_function(x, f)
will return aDiscreteDistribution
object that represents the distribution off(x)
. I wrote tests and made it work forf: 1->1
,f: n->1
,f: 1->n
, andf: n->m
. You only needf
to return anp.array
.Please ensure your pull request adheres to the following guidelines: