Clustering
index
../../../../piana/code/Clustering/Clustering.py

File        : Clustering.py
Author      : Pablo Boixeda & Ramon Aragues
Creation    : 5.2005
Contents    : Methods to cluterize Graphs using ClusteringStopCondition object and ClusteringSimilarityFunction object
Called from : Class to cluster graphs
 
=======================================================================================================

 
Modules
       
LinearAlgebra
PianaGlobals
copy
fgraph
getopt
numarray
piana_configuration_parameters
re
readline
sys

 
Classes
       
__builtin__.object
Clustering

 
class Clustering(__builtin__.object)
    Implements a class that cluterizes nodes of Graph objects
 
Methods to cluterize Graphs using ClusteringStopCondition object and ClusteringSimilarityFunction object
 
  Methods defined here:
__init__(self)
cluster_graph(self, graph_to_cluster=None, clustered_graph_generator=None, similarity_function=None, stop_condition=None)
Method that clusters a given Graph graph_to_cluster
 
Returns the clustered graph 
 
"graph to cluster": a graph witch we want to cluster
 
"clustered_graph_generator" is a Class that returns an empty GraphCluster (or a child class) when called with get_new_graph_cluster()
   -> this allows the user to control which kind of GraphCluster is going to use
 
"similarity_function": a ClusteringSimilarityFunction object
 
"stop_condition": a ClusteringStopCondition object
initialize_from_graph(self, graph_to_cluster=None, clustered_graph_generator=None)
Initializes the GraphCluster from a Graph object "graph"
 
Taking as input a graph, object, creates a cluster graph with
one node attribute per cluster. This cluster graph object is
then clusterized with method cluster_graph()
 
"graph_to_cluster": graph to transform to a GraphCluster object

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Clustering' objects>
list of weak references to the object (if defined)

 
Data
        root_nodes = {}
verbose = 0
verbose_add_edge_detailed = 0
verbose_add_edge_shallow = 0
verbose_expansion_detailed = 0
verbose_expansion_minimal = 1
verbose_expansion_shallow = 0
verbose_get_edge = 0
verbose_get_node = 0
verbose_has_edge = 0
verbose_join = 0
verbose_process = 1
verbose_propagate = 0
verbose_propagate_print = 0