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

add pareto distribution #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gsgarbi
Copy link

@gsgarbi gsgarbi commented Nov 21, 2018

No description provided.

@alexandrebouchard
Copy link
Contributor

Thanks again, let me know when the conflicts are resolved.

Copy link
Contributor

@alexandrebouchard alexandrebouchard left a comment

Choose a reason for hiding this comment

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

Thanks! Some minor changes proposed.

// support: (scale, \infty)

model Pareto {
random RealVar realization
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add comments for each random/param (see other built-in examples)

public static double pareto(Random random, double scale, double shape)
{
double result = new ParetoDistribution(generator(random), scale, shape).sample();
return result;
Copy link
Contributor

Choose a reason for hiding this comment

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

Simplify to

return new ParetoDistribution(generator(random), scale, shape).sample();

I think this pattern in this file is an artifact of some past debugging session. They could actually all be simplified.

@gsgarbi
Copy link
Author

gsgarbi commented Nov 26, 2018 via email

@alexandrebouchard
Copy link
Contributor

Once the conflicts above are resolved and my above comments addressed I'm happy to merge that pull request.

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.

2 participants