Examples of dataClasses()


Examples of edu.ucla.sspace.matrix.MatrixFactorization.dataClasses()

            new NonNegativeMatrixFactorizationMultiplicative();
        SparseMatrix matrix = new YaleSparseMatrix(VALUES);

        reducer.factorize(matrix, 2);

        Matrix W = reducer.dataClasses();
        assertEquals(4, W.rows());
        assertEquals(2, W.columns());

        Matrix H = reducer.classFeatures();
        assertEquals(2, H.rows());
View Full Code Here

Examples of edu.ucla.sspace.matrix.MatrixFactorization.dataClasses()

                                          format);

        reducer.factorize(mFile, dimensions);

        File wordSpaceFile = new File(options.getStringOption('w'));
        MatrixIO.writeMatrix(reducer.dataClasses(), wordSpaceFile,
                             Format.DENSE_TEXT);

        File docSpaceFile = new File(options.getStringOption('d'));
        MatrixIO.writeMatrix(reducer.classFeatures(), docSpaceFile,
                             Format.DENSE_TEXT);
View Full Code Here

Examples of edu.ucla.sspace.matrix.MatrixFactorization.dataClasses()

            : Format.SVDLIBC_DENSE_TEXT;

        MatrixFactorization factorizer = SVD.getFastestAvailableFactorization();
        factorizer.factorize(new MatrixFile(matrixFile, inputFormat), dimensions);
        File uFile = new File(outputDir, "U.mat");
        MatrixIO.writeMatrix(factorizer.dataClasses(), uFile, outputFormat);
        File vFile = new File(outputDir, "V.mat");
        MatrixIO.writeMatrix(factorizer.classFeatures(), vFile, outputFormat);
    }

    private static MatrixIO.Format getFormat(String code) {
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.