Package edu.ucla.sspace.matrix

Examples of edu.ucla.sspace.matrix.SymmetricMatrix


     * SimilarityFunction} will be used to build a symmetric adjacency matrix
     * and the {@link ClusterLink} will determine how to udpate similarities
     * between newly nerged clusters.
     */
    public Assignments cluster(Matrix m, int numClusters, Properties props) {
        Matrix adj = new SymmetricMatrix(m.rows(), m.rows());
        for (int r = 0; r < m.rows(); ++r) {
            DoubleVector v = m.getRowVector(r);
            for (int c = r+1; c < m.rows(); ++c)
                adj.set(r,c, simFunc.sim(v, m.getRowVector(c)));
        }
        return clusterAdjacencyMatrix(adj, method, numClusters);
    }
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.matrix.SymmetricMatrix

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.