Examples of classFeatures()


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

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

        Matrix H = reducer.classFeatures();
        assertEquals(2, H.rows());
        assertEquals(3, H.columns());

        /*
        for (int r = 0; r < 4; ++r) {
View Full Code Here

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

        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.classFeatures()

        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) {
        if (code.equals("cd"))
            return MatrixIO.Format.CLUTO_DENSE;
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.