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

Added Half-Normal & Log-Normal Distributions #1063

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

mschrader15
Copy link
Contributor

I had a use case for a mixture model of half-normal & lognormal distributions. I did a quick implementation by sub-classing the normal distribution.

Missing tests, but this suffices for my use-case

@jmschrei
Copy link
Owner

Nice, thanks. I'll look into merging this soon.

There are two ways to initialize this object. The first is to pass in
the tensor of probablity parameters, at which point they can immediately be
used. The second is to not pass in the rate parameters and then call
either `fit` or `summary` + `from_summaries`, at which point the probability
Copy link
Contributor

@jkleckner jkleckner Nov 4, 2023

Choose a reason for hiding this comment

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

Nit: summary -> summarize

There are two ways to initialize this object. The first is to pass in
the tensor of probablity parameters, at which point they can immediately be
used. The second is to not pass in the rate parameters and then call
either `fit` or `summary` + `from_summaries`, at which point the probability
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

@jmschrei
Copy link
Owner

Sorry for the delay in approval. Would you mind adding in unit tests, of the style of the other distributions?

@jmschrei
Copy link
Owner

Otherwise this LGTM

@jmschrei jmschrei merged commit 9a8cf3b into jmschrei:master Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants