Bugzilla – Bug 2513
ParetoRandomVariable needs a "scale", not a "mean" attribute.
Last modified: 2016-11-07 20:08:44 UTC
Now that we have an attribute deprecation system... The actual ParetoRandomVariable class has a "Mean" attribute, but it's limiting. If we don't have a "Scale" attribute, the scale is calculated as: double scale = mean * (shape - 1.0) / shape; This works until shape is greater than one. If it's lower or equal to one... boom. However, the problem is that the Pareto distribution parameters are the *Shape* and the *Scale*. It is totally legit for a Pareto distribution to not have a mean. My proposal is to deprecate the Mean attribute and add a Scale attribute. If the user sets the Mean, we have to check for the Shape to be greater than one (otherwise it's an error). If the user doesn't set the Mean... well, all is fine.
Created attachment 2599 [details] New attribute and so on
Created attachment 2653 [details] new patch - fixed a bug and the tests
(In reply to Tommaso Pecorella from comment #2) > Created attachment 2653 [details] > new patch - fixed a bug and the tests OK by me; please update the 'changes to existing API' in CHANGES.html when pushed.
changeset 12397:6572761077e5