Package org.apache.mahout.math.hadoop

Examples of org.apache.mahout.math.hadoop.DistributedRowMatrix.configure()


            List<Double> eigenValues, String outputEigenVectorPathString)
            throws IOException {
    DistributedRowMatrix matrix = new DistributedRowMatrix(
                      inputPath, outputTmpPath,
                      numRows, numCols);
    matrix.configure(new JobConf(originalConfig));
    setConf(originalConfig);
    solve(matrix, desiredRank, eigenVectors, eigenValues, isSymmetric);
    serializeOutput(eigenVectors, eigenValues, new Path(outputEigenVectorPathString));
  }
View Full Code Here


                 int desiredRank) throws Exception {
    Matrix eigenVectors = new DenseMatrix(desiredRank, numCols);
    List<Double> eigenValues = new ArrayList<Double>();

    DistributedRowMatrix matrix = new DistributedRowMatrix(inputPath, outputTmpPath, numRows, numCols);
    matrix.configure(new JobConf(getConf() != null ? getConf() : new Configuration()));
    solve(matrix, desiredRank, eigenVectors, eigenValues, isSymmetric);

    Path outputEigenVectorPath = new Path(outputPath, RAW_EIGENVECTORS);
    serializeOutput(eigenVectors, eigenValues, outputEigenVectorPath);
    return 0;
View Full Code Here

  @Test
  public void testDistributedLanczosSolverCLI() throws Exception {
    Path testData = getTestTempDirPath("testdata");
    DistributedRowMatrix corpus =
        new TestDistributedRowMatrix().randomDistributedMatrix(500, 450, 500, 10, 10.0, true, testData.toString());
    corpus.configure(new JobConf());
    Path output = getTestTempDirPath("output");
    Path tmp = getTestTempDirPath("tmp");
    String[] args = {
        "-i", new Path(testData, "distMatrix").toString(),
        "-o", output.toString(),
View Full Code Here

  @Test
  public void testDistributedLanczosSolverEVJCLI() throws Exception {
    Path testData = getTestTempDirPath("testdata");
    DistributedRowMatrix corpus =
        new TestDistributedRowMatrix().randomDistributedMatrix(500, 450, 500, 10, 10.0, true, testData.toString());
    corpus.configure(new JobConf());
    Path output = getTestTempDirPath("output");
    Path tmp = getTestTempDirPath("tmp");
    String[] args = {
        "-i", new Path(testData, "distMatrix").toString(),
        "-o", output.toString(),
View Full Code Here

  private void doTestDistributedLanczosSolver(boolean symmetric) throws IOException {
    File testData = getTestTempDir("testdata");
    DistributedRowMatrix corpus = new TestDistributedRowMatrix().randomDistributedMatrix(500,
        450, 400, 10, 10.0, symmetric, testData.getAbsolutePath());
    corpus.configure(new JobConf());
    DistributedLanczosSolver solver = new DistributedLanczosSolver();
    int desiredRank = 30;
    Matrix eigenVectors = new DenseMatrix(desiredRank, corpus.numCols());
    List<Double> eigenValues = new ArrayList<Double>();
    solver.solve(corpus, desiredRank, eigenVectors, eigenValues, symmetric);
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.