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

Method meanVector

JSAT/src/jsat/linear/MatrixStatistics.java:27–35  ·  view source on GitHub ↗

Computes the mean of the given data set. @param the vector type @param dataSet the list of vectors to compute the mean of @return the mean of the vectors

(List<V> dataSet)

Source from the content-addressed store, hash-verified

25 * @return the mean of the vectors
26 */
27 public static <V extends Vec> Vec meanVector(List<V> dataSet)
28 {
29 if(dataSet.isEmpty())
30 throw new ArithmeticException("Can not compute the mean of zero data points");
31
32 Vec mean = new DenseVector(dataSet.get(0).length());
33 meanVector(mean, dataSet);
34 return mean;
35 }
36
37 /**
38 * Computes the weighted mean of the given data set.

Callers 13

testTransformMethod · 0.95
testTransformMethod · 0.95
getColumnMeanVarianceMethod · 0.95
trainMethod · 0.95
trainMethod · 0.95
setUsingDataMethod · 0.95
mqSelectionMethod · 0.95
clusterMethod · 0.95
clusterMethod · 0.95
evaluateMethod · 0.95
evaluateMethod · 0.95
evaluateMethod · 0.95

Calls 10

getWeightMethod · 0.95
getNumericalValuesMethod · 0.95
getNumNumericalVarsMethod · 0.80
sizeMethod · 0.65
lengthMethod · 0.45
getMethod · 0.45
mutableAddMethod · 0.45
mutableDivideMethod · 0.45
getSampleSizeMethod · 0.45
getDataPointMethod · 0.45

Tested by 2

testTransformMethod · 0.76
testTransformMethod · 0.76