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.
()
| 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. |
no test coverage detected