Mercurial Hosting > traffic-intelligence
diff python/utils.py @ 854:33d296984dd8
rework and more info on speed probabilities for classification
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 22 Sep 2016 17:50:35 -0400 |
parents | 36c5bee9a887 |
children | 2277ab1a8141 |
line wrap: on
line diff
--- a/python/utils.py Thu Sep 22 16:49:43 2016 -0400 +++ b/python/utils.py Thu Sep 22 17:50:35 2016 -0400 @@ -39,9 +39,11 @@ def logNormalMeanVar(loc, scale): '''location and scale are respectively the mean and standard deviation of the normal in the log-normal distribution - https://en.wikipedia.org/wiki/Log-normal_distribution''' + https://en.wikipedia.org/wiki/Log-normal_distribution + + same as lognorm.stats(scale, 0, exp(loc))''' mean = exp(loc+(scale**2)/2) - var = (exp(loc**2)-1)*exp(2*loc+scale**2) + var = (exp(scale**2)-1)*exp(2*loc+scale**2) return mean, var def sampleSize(stdev, tolerance, percentConfidence, printLatex = False):