Package org.apache.mahout.math.ssvd

Examples of org.apache.mahout.math.ssvd.EigenSolverWrapper


      for (int j = 0; j < kp; j++) {
        bbtValues[i][j] = bbtRow.getQuick(j);
      }
    }

    EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtValues);
    double[] eigenva2 = eigenWrapper.getEigenValues();
    double[] svalues = new double[kp];
    for (int i = 0; i < kp; i++) {
      svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
    }
View Full Code Here


      for (int j = 0; j < kp; j++) {
        bbtValues[i][j] = bbtRow.getQuick(j);
      }
    }

    EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtValues);

    double[] eigenva2 = eigenWrapper.getEigenValues();
    double[] svalues = new double[kp];
    for (int i = 0; i < kp; i++) {
      svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
    }
View Full Code Here

      }

      svalues = new double[k + p];

      // try something else.
      EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtSquare);

      double[] eigenva2 = eigenWrapper.getEigenValues();
      for (int i = 0; i < k + p; i++) {
        svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
      }

      // save/redistribute UHat
      double[][] uHat = eigenWrapper.getUHat();

      fs.mkdirs(uHatPath);
      SequenceFile.Writer uHatWriter =
        SequenceFile.createWriter(fs,
                                  conf,
View Full Code Here

        outerSq.assign(Functions.mult(xisquaredlen));
        bbtSquare.assign(outerSq, Functions.PLUS);

      }

      EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(SSVDHelper.extractRawData(bbtSquare));
      Matrix uHat = new DenseMatrix(eigenWrapper.getUHat());
      svalues = new DenseVector(eigenWrapper.getEigenValues());

      svalues.assign(Functions.SQRT);

      // save/redistribute UHat
      fs.mkdirs(uHatPath);
View Full Code Here

      for (int j = 0; j < kp; j++) {
        bbtValues[i][j] = bbtRow.getQuick(j);
      }
    }

    EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtValues);
    double[] eigenva2 = eigenWrapper.getEigenValues();
    double[] svalues = new double[kp];
    for (int i = 0; i < kp; i++) {
      svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
    }
View Full Code Here

      for (int j = 0; j < kp; j++) {
        bbtValues[i][j] = bbtRow.getQuick(j);
      }
    }

    EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtValues);

    double[] eigenva2 = eigenWrapper.getEigenValues();
    double[] svalues = new double[kp];
    for (int i = 0; i < kp; i++) {
      svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
    }
View Full Code Here

      }

      svalues = new double[k + p];

      // try something else.
      EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(bbtSquare);

      double[] eigenva2 = eigenWrapper.getEigenValues();
      for (int i = 0; i < k + p; i++) {
        svalues[i] = Math.sqrt(eigenva2[i]); // sqrt?
      }

      // save/redistribute UHat
      //
      double[][] uHat = eigenWrapper.getUHat();

      fs.mkdirs(uHatPath);
      SequenceFile.Writer uHatWriter = SequenceFile.createWriter(fs, conf,
          uHatPath = new Path(uHatPath, "uhat.seq"), IntWritable.class,
          VectorWritable.class, CompressionType.BLOCK);
View Full Code Here

        outerSq.assign(Functions.mult(xisquaredlen));
        bbtSquare.assign(outerSq, Functions.PLUS);

      }

      EigenSolverWrapper eigenWrapper = new EigenSolverWrapper(SSVDHelper.extractRawData(bbtSquare));
      Matrix uHat = new DenseMatrix(eigenWrapper.getUHat());
      svalues = new DenseVector(eigenWrapper.getEigenValues());

      svalues.assign(Functions.SQRT);

      // save/redistribute UHat
      fs.mkdirs(uHatPath);
View Full Code Here

TOP

Related Classes of org.apache.mahout.math.ssvd.EigenSolverWrapper

Copyright © 2018 www.massapicom. 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.