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

Method setUsingData

JSAT/src/jsat/distributions/multivariate/NormalM.java:145–163  ·  view source on GitHub ↗
(List<V> dataSet)

Source from the content-addressed store, hash-verified

143 }
144
145 @Override
146 public <V extends Vec> boolean setUsingData(List<V> dataSet)
147 {
148 Vec origMean = this.mean;
149 try
150 {
151 Vec newMean = MatrixStatistics.meanVector(dataSet);
152 Matrix covariance = MatrixStatistics.covarianceMatrix(newMean, dataSet);
153
154 this.mean = newMean;
155 setCovariance(covariance);
156 return true;
157 }
158 catch(ArithmeticException ex)
159 {
160 this.mean = origMean;
161 return false;
162 }
163 }
164
165 @Override
166 public boolean setUsingDataList(List<DataPoint> dataSet)

Callers

nothing calls this directly

Calls 3

meanVectorMethod · 0.95
covarianceMatrixMethod · 0.95
setCovarianceMethod · 0.95

Tested by

no test coverage detected