blangSDK
blangSDK copied to clipboard
add pareto distribution
Thanks again, let me know when the conflicts are resolved.
Alright, will do! Thanks!
On Mon, Nov 26, 2018, 14:47 Alexandre Bouchard <[email protected] wrote:
@alexandrebouchard requested changes on this pull request.
Thanks! Some minor changes proposed.
In src/main/java/blang/distributions/Pareto.bl https://github.com/UBC-Stat-ML/blangSDK/pull/113#discussion_r236457562:
@@ -0,0 +1,23 @@ +package blang.distributions +// Pareto distribution +// support: (scale, \infty)
+model Pareto {
- random RealVar realization
Please add comments for each random/param (see other built-in examples)
In src/main/java/blang/distributions/Generators.java https://github.com/UBC-Stat-ML/blangSDK/pull/113#discussion_r236457993:
@@ -28,6 +29,14 @@ public static double halfstudentt(Random random, double nu, double sigma) { double t = studentt(random, nu); return Math.abs(t) * sigma; }
- /** */
- public static double pareto(Random random, double scale, double shape)
- {
- double result = new ParetoDistribution(generator(random), scale, shape).sample();
- return result;
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.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/UBC-Stat-ML/blangSDK/pull/113#pullrequestreview-178537713, or mute the thread https://github.com/notifications/unsubscribe-auth/AlAAF14VolVwivqamPCMPIp1C679mIC9ks5uzG-VgaJpZM4YtFcb .
Once the conflicts above are resolved and my above comments addressed I'm happy to merge that pull request.