Exemple #1
0
 @Override
 public void reduce(DRemoteTask rt) {
   KMeansScore kms = (KMeansScore) rt;
   if (_rows == null) {
     _rows = kms._rows;
     _dist = kms._dist;
   } else {
     Utils.add(_rows, kms._rows);
     Utils.add(_dist, kms._dist);
   }
 }
Exemple #2
0
 @Override
 public void reduce(CM cm) {
   if (_cm != null && cm._cm != null) {
     Utils.add(_cm, cm._cm);
   } else {
     assert (_mse != Double.NaN && cm._mse != Double.NaN);
     assert (_cm == null && cm._cm == null);
     _mse += cm._mse;
     _count += cm._count;
   }
 }
Exemple #3
0
 @Override
 public void reduce(GammaPass gp) {
   Utils.add(_gss, gp._gss);
   Utils.add(_rss, gp._rss);
 }
Exemple #4
0
 @Override
 public void reduce(ClassDist that) {
   Utils.add(_ys, that._ys);
 }
Exemple #5
0
 public static float[][] add(float[][] a, float[][] b) {
   for(int i = 0; i < a.length; i++ ) add(a[i],b[i]);
   return a;
 }
Exemple #6
0
 public static long[][] add(long[][] a, long[][] b) {
   for(int i = 0; i < a.length; i++ ) add(a[i],b[i]);
   return a;
 }