MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / skewness

Method skewness

JSAT/src/jsat/linear/DenseVector.java:190–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 }
189
190 @Override
191 public double skewness()
192 {
193 double mean = mean();
194
195 double tmp = 0;
196
197 for(int i = startIndex; i < endIndex; i++)
198 tmp += pow(array[i]-mean, 3);
199
200 double s1 = tmp / (pow(standardDeviation(), 3) * (array.length-1) );
201
202 if(array.length >= 3)//We can use the bias corrected formula
203 return sqrt(array.length*(array.length-1))/(array.length-2)*s1;
204
205 return s1;
206 }
207
208 @Override
209 public double kurtosis()

Callers

nothing calls this directly

Calls 3

meanMethod · 0.45
powMethod · 0.45
standardDeviationMethod · 0.45

Tested by

no test coverage detected