<p>In <a href="https://github.com/mlpack/mlpack/pull/742#discussion_r72756230">src/mlpack/methods/preprocess/preprocess_describe_main.cpp</a>:</p>
<pre style='color:#555'>> + * @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);
</pre>
<p>Why not just write</p>
<p><code>skewness = M3 / (n*S3);</code></p>
<p>Besides, according to the <a href="http://www.macroption.com/skewness-formula/">formula </a>at this page, I think the equation of population skewness should be</p>
<p>std::sqrt(n) * M3 / S3</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/742/files/27ac82e876c3d68637d9e72d28bf0dadbc229ace#r72756230">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFF1n3zO6sJrtm6_wDxzEtRNK0On6ks5qaba7gaJpZM4JWax8">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOrnaGvks837qXVaTktuVUuBYu07ks5qaba7gaJpZM4JWax8.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/742/files/27ac82e876c3d68637d9e72d28bf0dadbc229ace#r72756230"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>