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

basic truncated normal dist #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

basic truncated normal dist #36

wants to merge 2 commits into from

Conversation

phobson
Copy link
Owner

@phobson phobson commented Mar 12, 2016

closes #35

if lower is not None and mu is not None and sigma is not None:
a = (lower - mu) / sigma

if upper is not None and mu is not None and sigma is not None:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ev-br sorry to bother you. any thoughts on how to deal with missing parameters when fitting? this method seems almost useless if you need 3 parameters just to fix one.

In other words, scipy.stats.truncnorm.fit(fa=<guess>) will work, but paramnormal.truncated_normal.fit(lower=<guess>) won't since you also need mu and sigma to estimate a.

On the otherhand, if you're fitting truncnorm distributions and you have a guess for a, does it follow that you implicitly have a guess for sigma and mu?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geez, that's confusing! A quick thought, likely rubbish --- how about say, fixing upper and lower from the extent of the data and then calling truncnorm.fit_loc_scale to estimate mu and sigma?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c30f4bc on add-truncnorm into d8ea7b8 on master.

@phobson phobson changed the title WIP: basic truncated normal dist basic truncated normal dist Jul 28, 2016
References
----------
http://scipy.github.io/devdocs/generated/scipy.stats.truncnorm
https://en.wikipedia.org/wiki/Rice_distribution
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rice?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and I didn't know about fit_loc_scale! Will check it out.

On Fri, Jul 29, 2016 at 5:03 AM Evgeni Burovski [email protected]
wrote:

In paramnormal/dist.py
#36 (comment):

  • and
  • .. math::
  •    b = \frac{x_{\mathrm{upper bound}} - \mu}{\sigma}
    
  • Since a and b are directly linked to the location and scale
  • of the distribution as well as the lower and upper limits,
  • respectively, it's difficult to use the fit method of this
  • distirbution without either knowing a lot about it a priori or
  • assuming just as much.
  • References

Rice?


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/phobson/paramnormal/pull/36/files/c30f4bcfcc2a0e8b426c322d7eb383556547d7af#r72780884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABHCowITbToKZ4dE3_fR0uKTVadumbB6ks5qaev4gaJpZM4HvL4U
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maybe add truncated normal
3 participants