Package edu.ucla.sspace.graph

Examples of edu.ucla.sspace.graph.LinkClustering

This algorithm automatically determines the number of clusters based on a partition density function. Accordingly, the clustering methods take no parameters. Calling the {@code cluster} method with a fixed number ofelements will still cluster the rows, but will ignore the requester number of clusters.

Note that this class is not thread-safe. Each call to clustering will cache local information about the clustering result to facilitate the {@link #getSolution(int)} and {@link #getSolutionDensity(int)} functions.This class provides one configurable property:

Property: {@value #KEEP_SIMILARITY_MATRIX_IN_MEMORY_PROPERTY}
Default: {@code true}
If {@code true}, this property specifies the edge similarity matrix used by {@link HierarchicalAgglomerativeClustering} should be computed once and thenkept in memory, which is the default behavior. If {@code false}, this causes the similarity of two edges to be recomputed on-the-fly whenever it is requester. By computing these values on-the-fly, the performance will be slowed down, depending on the complexity of the edge similarity function. However, this on-the-fly setting allows for clustering large graphs whose edge similarity matrix would not regularly fit into memory. It is advised that users not tune this parameter unless it is known that the similarity matrix will not fit in memory.

@author David Jurgens

                graph = GraphIO.readUndirectedFromWeighted(
                    f, vertexLabels, opts.getDoubleOption('W'));
            else
                GraphIO.readUndirected(f, vertexLabels);

            LinkClustering lc = new LinkClustering();
            MultiMap<Integer,Integer> clusterToVertices =
                lc.cluster(graph, System.getProperties());

            PrintWriter pw = new PrintWriter(
                new BufferedOutputStream(new FileOutputStream(
                                         opts.getPositionalArg(1))));
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.graph.LinkClustering

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.