Package org.apache.mahout.math.hadoop.stochasticsvd

Examples of org.apache.mahout.math.hadoop.stochasticsvd.UpperTriangular


  /*
   * warning: both of these return actually n+1 rows with the last one being //
   * not interesting.
   */
  public UpperTriangular getRTilde() {
    UpperTriangular packedR = new UpperTriangular(n);
    for (int i = 0; i < n; i++) {
      packedR.assignNonZeroElementsInRow(i, getRRow(i));
    }
    return packedR;
  }
View Full Code Here


  }

  public static double[][] computeQtHat(double[][] qt, int i,
      Iterator<UpperTriangular> rIter) {
    UpperTriangular rTilde = rIter.next();
    for (int j = 1; j < i; j++) {
      mergeR(rTilde, rIter.next());
    }
    if (i > 0) {
      qt = mergeQrDown(rTilde, qt, rIter.next());
View Full Code Here

  public int getKP() {
    return kp;
  }

  private void flushSolver() throws IOException {
    UpperTriangular r = qSolver.getRTilde();
    double[][] qt = qSolver.getThinQtTilde();

    rSubseq.add(r);

    value.setBlock(qt);
View Full Code Here

     */
    int block = 0;
    while (rHatInput.hasNext()) {
      Vector value = rHatInput.next().get();
      if (block < blockNum && block > 0) {
        GivensThinSolver.mergeR(mRs.get(0), new UpperTriangular(value));
      } else {
        mRs.add(new UpperTriangular(value));
      }
      block++;
    }

  }
View Full Code Here

  /*
   * warning: both of these return actually n+1 rows with the last one being //
   * not interesting.
   */
  public UpperTriangular getRTilde() {
    UpperTriangular packedR = new UpperTriangular(n);
    for (int i = 0; i < n; i++) {
      packedR.assignNonZeroElementsInRow(i, getRRow(i));
    }
    return packedR;
  }
View Full Code Here

  }

  public static double[][] computeQtHat(double[][] qt, int i,
      Iterator<UpperTriangular> rIter) {
    UpperTriangular rTilde = rIter.next();
    for (int j = 1; j < i; j++) {
      mergeR(rTilde, rIter.next());
    }
    if (i > 0) {
      qt = mergeQrDown(rTilde, qt, rIter.next());
View Full Code Here

  public int getKP() {
    return kp;
  }

  private void flushSolver() throws IOException {
    UpperTriangular r = qSolver.getRTilde();
    double[][] qt = qSolver.getThinQtTilde();

    rSubseq.add(r);

    value.setBlock(qt);
View Full Code Here

     */
    int block = 0;
    while (rHatInput.hasNext()) {
      Vector value = rHatInput.next().get();
      if (block < blockNum && block > 0) {
        GivensThinSolver.mergeR(mRs.get(0), new UpperTriangular(value));
      } else {
        mRs.add(new UpperTriangular(value));
      }
      block++;
    }

  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.math.hadoop.stochasticsvd.UpperTriangular

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.