[mlpack-git] [mlpack/mlpack] Descriptive Statistics command-line program (#742)

Keon Kim notifications at github.com
Sat Aug 6 02:42:19 EDT 2016


> + * @param rowMean Mean of the given vector.
> + * @return Skewness of the given vector.
> + */
> +double Skewness(const arma::rowvec& input,
> +    const double& rowStd,
> +    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);

@stereomatchingkiss I imitated the result from [excel](https://support.office.com/en-US/article/SKEW-P-function-76530A5C-99B9-48A1-8392-26632D542FCB)
I guess this is equivalent to "direct skewness formula" in the [page](http://www.macroption.com/skewness-formula/)

---
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#r73781882
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160805/776c49db/attachment.html>


More information about the mlpack-git mailing list