congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DMat.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ch.akuhn.edu.mit.tedlab.DMat
constructor

Best Java code snippets using ch.akuhn.edu.mit.tedlab.DMat.<init> (Showing top 5 results out of 315)

origin: edu.ucla.sspace/sspace-wordsi

static DMat svdTransposeD(DMat D) {
  int r, c;
  DMat N = new DMat(D.cols, D.rows);
  for (r = 0; r < D.rows; r++)
    for (c = 0; c < D.cols; c++)
      N.value[c][r] = D.value[r][c];
  return N;
}
origin: semanticvectors/semanticvectors

static DMat svdTransposeD(DMat D) {
  int r, c;
  DMat N = new DMat(D.cols, D.rows);
  for (r = 0; r < D.rows; r++)
    for (c = 0; c < D.cols; c++)
      N.value[c][r] = D.value[r][c];
  return N;
}
origin: semanticvectors/semanticvectors

public PrincipalComponents (ObjectVector[] vectorInput) {
 this.vectorInput = vectorInput;
 this.dimension = vectorInput[0].getVector().getDimension();
 double[][] vectorArray = new double[vectorInput.length][dimension];
 for (int i = 0; i < vectorInput.length; ++i) {
  if (vectorInput[i].getVector().getClass() != RealVector.class) {
   throw new IncompatibleVectorsException(
     "Principal components class only works with Real Vectors so far!");
  }
  if (vectorInput[i].getVector().getDimension() != dimension) {
   throw new IncompatibleVectorsException("Dimensions must all be equal!");
  }
  RealVector realVector = (RealVector) vectorInput[i].getVector();
  float[] tempVec = realVector.getCoordinates().clone();
  for (int j = 0; j < dimension; ++j) {
   vectorArray[i][j] = (double) tempVec[j];
  }
 }
 this.matrix = new DMat(vectorArray.length, vectorArray[0].length);
 matrix.value = vectorArray;
 System.err.println("Created matrix ... performing svd ...");
 Svdlib svd = new Svdlib();
 System.err.println("Starting SVD using algorithm LAS2");
 svdR = svd.svdLAS2A(Svdlib.svdConvertDtoS(matrix), matrix.cols);
}
origin: semanticvectors/semanticvectors

    R = new SVDRec();
    R.S = new double[0];
    R.Ut = new DMat(0,A.rows);
    R.Vt = new DMat(0,A.cols);
    return R;
R.Ut = new DMat(R.d, A.rows);
R.S  = svd_doubleArray(R.d, true, "las2: R->s");
R.Vt = new DMat(R.d, A.cols);
origin: edu.ucla.sspace/sspace-wordsi

    R = new SVDRec();
    R.S = new double[0];
    R.Ut = new DMat(0,A.rows);
    R.Vt = new DMat(0,A.cols);
    return R;
R.Ut = new DMat(R.d, A.rows);
R.S  = svd_doubleArray(R.d, true, "las2: R->s");
R.Vt = new DMat(R.d, A.cols);
ch.akuhn.edu.mit.tedlabDMat<init>

Popular methods of DMat

    Popular in Java

    • Reading from database using SQL prepared statement
    • getResourceAsStream (ClassLoader)
    • getSupportFragmentManager (FragmentActivity)
    • setScale (BigDecimal)
    • ObjectMapper (com.fasterxml.jackson.databind)
      ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
    • VirtualMachine (com.sun.tools.attach)
      A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
    • Thread (java.lang)
      A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
    • GregorianCalendar (java.util)
      GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
    • Timer (java.util)
      Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
    • ImageIO (javax.imageio)
    • Top 12 Jupyter Notebook extensions
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now