Package org.ejml.simple

Examples of org.ejml.simple.SimpleMatrix.mult()


      for (int trainingExample = 0; trainingExample < centroids.get(centroid).trainingExamples.size(); trainingExample++) {
        errorMatrix[(centroids.get(centroid).trainingExamples.get(trainingExample))] = centroids.get(centroid).features;
      }
    }   
    SimpleMatrix errorSimpleMatrix = new SimpleMatrix(errorMatrix).minus(datasetMatrix);
    errorSimpleMatrix = errorSimpleMatrix.mult(errorSimpleMatrix.transpose());
    double error = errorSimpleMatrix.elementSum() / (noFeatures * noTrainingExamples);
   
    LOGGER.info("Clustering completed - Error: " + Math.floor(error * 100) + "%");     

    return centroids;
View Full Code Here


        q.combine(0, 1*n, b);
        q.combine(n, 0*n, c);
        q.combine(n, 1*n, d);

        SimpleMatrix x = p.transpose().mult(p);
        x = x.mult(x);
        x = x.mult(x);
        v.set(i, x.trace());

        x = q.transpose().mult(q);
        x = x.mult(x);
View Full Code Here

        q.combine(n, 0*n, c);
        q.combine(n, 1*n, d);

        SimpleMatrix x = p.transpose().mult(p);
        x = x.mult(x);
        x = x.mult(x);
        v.set(i, x.trace());

        x = q.transpose().mult(q);
        x = x.mult(x);
        x = x.mult(x);
View Full Code Here

        x = x.mult(x);
        x = x.mult(x);
        v.set(i, x.trace());

        x = q.transpose().mult(q);
        x = x.mult(x);
        x = x.mult(x);
        w.set(i, x.trace());

      }
      return new double[]{stdev(v)/mean(v),stdev(w)/mean(w)};
View Full Code Here

        x = x.mult(x);
        v.set(i, x.trace());

        x = q.transpose().mult(q);
        x = x.mult(x);
        x = x.mult(x);
        w.set(i, x.trace());

      }
      return new double[]{stdev(v)/mean(v),stdev(w)/mean(w)};
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.