From e36366f900e48ab9f8085ad2bb53426b9fb9b59e Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Fri, 27 Jul 2018 19:18:22 -0400 Subject: [PATCH] Update height generation documentation --- devNotes/twine JS.txt | 8 ++++---- src/js/utilJS.tw | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 4437281b79c..c3ac4749366 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -2849,8 +2849,8 @@ Macro.add('foreach', { * Height.mean(nationality, race, genes) - returns the mean adult height for the given combination * Height.mean(slave) - returns the mean (expected) height for the given slave * - * Height.random(nationality, race, genes, age) - returns a random height for the given combination, - * with Gaussian distribution (mean = 1, standard deviation = 0.05) around the mean height + * Height.random(nationality, race, genes, age) - returns a random height using the skew-normal distribution + * around the mean height for the given arguments * Height.random(nationality, race, genes) - returns a random height for the given combination of an adult, as above * Height.random(slave[, options]) - returns a random height for the given slave, as above. * The additional options object can modify how the values are generated @@ -2889,9 +2889,9 @@ Macro.add('foreach', { * *Skew, spread, limitMult: These are statistics things. BTW, a gaussian distribution is a normal distribution. Just a naming thing. * - *Skew: See https://brownmath.com/stat/shape.htm#Skewness. Basically a measure of how asymmetrical the curve is. It doesn't change the mean, and can't move the main mass of the distribution far from the mean! The normal distribution can't do that. You can, however, use it to fatten one or the other tail. + *Skew: The shape parameter of a skew-normal distribution. See http://azzalini.stat.unipd.it/SN/Intro/intro.html for more details. Basically a measure of how asymmetrical the curve is. It doesn't move the main mass of the distribution. Rather, it's more like it moves mass from one of the tails into the main mass of the distribution. * - *Spread: Changes the average distance from the mean, making the graph wider and shorter. Moves "mass" from the center to the tail. It's basically standard deviation, but named funny because FC codebase. + *Spread: Changes the average distance from the mean, making the graph wider and shorter. Moves "mass" from the center to the tail. It's basically standard deviation, but named funny because FC codebase. Changing this can have dramatic effects. It's advised to keep this at or below 0.1 for usual height generation. * *limitMult: A clamp, expressed in z-score. (z=1 is one standard dev above mean, for ex.) If it excludes too much of the distribution the other parameters describe, you're going to spend lots of CPU making and throwing away heights. Don't worry about this unless you run into it. * diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw index 9d20cdf8bb3..f00ec3c0d07 100644 --- a/src/js/utilJS.tw +++ b/src/js/utilJS.tw @@ -5,8 +5,8 @@ * Height.mean(nationality, race, genes) - returns the mean adult height for the given combination * Height.mean(slave) - returns the mean (expected) height for the given slave * - * Height.random(nationality, race, genes, age) - returns a random height for the given combination, - * with Gaussian distribution (mean = 1, standard deviation = 0.05) around the mean height + * Height.random(nationality, race, genes, age) - returns a random height using the skew-normal distribution + * around the mean height for the given arguments * Height.random(nationality, race, genes) - returns a random height for the given combination of an adult, as above * Height.random(slave[, options]) - returns a random height for the given slave, as above. * The additional options object can modify how the values are generated @@ -45,9 +45,9 @@ * *Skew, spread, limitMult: These are statistics things. BTW, a gaussian distribution is a normal distribution. Just a naming thing. * - *Skew: See https://brownmath.com/stat/shape.htm#Skewness. Basically a measure of how asymmetrical the curve is. It doesn't change the mean, and can't move the main mass of the distribution far from the mean! The normal distribution can't do that. You can, however, use it to fatten one or the other tail. + *Skew: The shape parameter of a skew-normal distribution. See http://azzalini.stat.unipd.it/SN/Intro/intro.html for more details. Basically a measure of how asymmetrical the curve is. It doesn't move the main mass of the distribution. Rather, it's more like it moves mass from one of the tails into the main mass of the distribution. * - *Spread: Changes the average distance from the mean, making the graph wider and shorter. Moves "mass" from the center to the tail. It's basically standard deviation, but named funny because FC codebase. + *Spread: Changes the average distance from the mean, making the graph wider and shorter. Moves "mass" from the center to the tail. It's basically standard deviation, but named funny because FC codebase. Changing this can have dramatic effects. It's advised to keep this at or below 0.1 for usual height generation. * *limitMult: A clamp, expressed in z-score. (z=1 is one standard dev above mean, for ex.) If it excludes too much of the distribution the other parameters describe, you're going to spend lots of CPU making and throwing away heights. Don't worry about this unless you run into it. * -- GitLab