(List<V> dataSet)
| 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) |
nothing calls this directly
no test coverage detected