[mlpack-git] [mlpack/mlpack] Descriptive Statistics command-line program (#742)
Tham
notifications at github.com
Fri Jul 29 04:25:33 EDT 2016
> + const double& rowMean,
> + const bool population)
> +{
> + double skewness = 0;
> + double S3 = pow(rowStd, 3);
> + double M3 = SumNthPowerDeviations(input, rowMean, 3);
> + double n = input.n_elem;
> + if (population)
> + {
> + // Calculate Population Skewness
> + skewness = n * M3 / (n * n * S3);
> + }
> + else
> + {
> + // Calculate Sample Skewness
> + skewness = n * M3 / ((n-1) * (n-2) * S3);
As the `http://www.macroption.com/skewness-formula/`mention, the equation should be
`(n*std::sqrt(n-1)/std::sqrt(n-2)) * std::sqrt(n) * M3 / (n*S3)`
Please correct me if I am wrong
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/742/files/27ac82e876c3d68637d9e72d28bf0dadbc229ace#r72757317
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160729/2da1cbd6/attachment.html>
More information about the mlpack-git
mailing list