MCPcopy Index your code
hub / github.com/EdwardRaff/JSAT / getColumnMeanVariance

Method getColumnMeanVariance

JSAT/src/jsat/DataSet.java:336–352  ·  view source on GitHub ↗

Computes the weighted mean and variance for each column of feature values. This has less overhead than #getOnlineColumnStats(boolean) but returns less information. @return an array of the vectors containing the mean and variance for each column.

()

Source from the content-addressed store, hash-verified

334 * each column.
335 */
336 public Vec[] getColumnMeanVariance()
337 {
338 final int d = getNumNumericalVars();
339 Vec[] vecs = new Vec[]
340 {
341 new DenseVector(d),
342 new DenseVector(d)
343 };
344
345 Vec means = vecs[0];
346 Vec stdDevs = vecs[1];
347
348 MatrixStatistics.meanVector(means, this);
349 MatrixStatistics.covarianceDiag(means, stdDevs, this);
350
351 return vecs;
352 }
353
354 /**
355 * Returns an iterator that will iterate over all data points in the set.

Callers 5

trainMethod · 0.80
trainCMethod · 0.80
fitMethod · 0.80
fitMethod · 0.80
fitMethod · 0.80

Calls 3

getNumNumericalVarsMethod · 0.95
meanVectorMethod · 0.95
covarianceDiagMethod · 0.95

Tested by

no test coverage detected