Package org.codemap.svdlib

Examples of org.codemap.svdlib.Svdlib


            U = new double[matrix.rowCount()][0];
            V = new double[matrix.columnCount()][0];
        }
        else {
            SMat input = makeSMat(matrix);
            SVDRec r = new Svdlib().svdLAS2(input, dimensions, 0, new double[] { -1e-30, 1e-30 }, 1e-6);
            s = r.S;
            U = transpose(r.Ut.value);
            V = transpose(r.Vt.value);
        }
        assert invariant();
View Full Code Here


    public double[] makePseudoV(double[] weightings) {
        return project(U, weightings);
    }

    /*default*/ static final SMat makeSMat(SparseMatrix matrix) {
        SMat S = new Svdlib().new SMat(matrix.rowCount(), matrix.columnCount(), matrix.used());
        for (int j = 0, n = 0; j < matrix.columnCount(); j++) {
            S.pointr[j] = n;
            for (int i = 0; i < matrix.rowCount(); i++)
                if (matrix.get(i, j) != 0) {
                    S.rowind[n] = i;
View Full Code Here

TOP

Related Classes of org.codemap.svdlib.Svdlib

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.