-
-
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
scipy.stats
distributions
#1197
Conversation
reset and generate new random seed; implement generic draw method; rng is now private attribute
create parametrized (frozen) distributions from scipy with seed management
create discrete scipy distributions with seed manager
Codecov ReportBase: 73.38% // Head: 73.28% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1197 +/- ##
==========================================
- Coverage 73.38% 73.28% -0.11%
==========================================
Files 74 74
Lines 12150 12149 -1
==========================================
- Hits 8916 8903 -13
- Misses 3234 3246 +12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
set probability in from_dataset method
DiscreteDistribution returns self
Only comment is that I'd like it if the invocations of |
Ok, right now the default for every distribution is |
OK, I'm happy with this now. (Actually, delighted). Only two things I can think of:
|
@llorracc the only way I can think of checking this branch against DemARK's is locally. I will try that and see what the results are |
@llorracc seems like DemARK's already broke with previous merge so I'll have to go and fix them anyway |
""" | ||
Construct a discrete approximation to a lognormal distribution with underlying | ||
normal distribution N(mu,sigma). Makes an equiprobable distribution by | ||
default, but user can optionally request augmented tails with exponentially | ||
sized point masses. This can improve solution accuracy in some models. | ||
|
||
TODO: add endpoints option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue for this in the issue tracker?
Are you going to do it in this PR, or leave it to a later release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of leaving it for a different PR since I still need to discuss how to do this with the group.
I will make an issue for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tail_N": tail_N, | ||
"tail_bound": tail_bound, | ||
"tail_order": tail_order, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be implemented a little more generically using **kwargs
to capture the arguments given the discretize
method.
https://www.digitalocean.com/community/tutorials/how-to-use-args-and-kwargs-in-python-3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. Will think about this and leave it for a different PR.
`DiscreteDistribution` is already an approximation, so this method | ||
returns a copy of the distribution. | ||
|
||
TODO: print warning message? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will write an issue for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! See review comment inline. Please update the CHANGELOG in this PR. |
Changes in this PR:
|
scipy.stats
distributionsscipy.stats
distributions
Please ensure your pull request adheres to the following guidelines: