|
Methods defined here:
- __init__(self, dbaccess=None, mode=None, path_length_threshold_value=None)
- "dbaccess" is a database accession object used to access information from a database, in case the similarity function needs information
that is not contained in the node itself. If not being used, just set to None
"mode" defines how to evaluate the distance between two clusters:
- random takes a random element from each cluster and evaluates similarity between them
- min takes the minimal distance between elements of each cluster
- max takes the maximal distance between elements of each cluster
- average takes the average distance between all elements of each cluster
- calculate_similarity(self, list_node_attributes1, list_node_attributes2)
- Method that returns similarity score from two lists of attributes of nodes that are being clustered
"list_node_attributes1" is a list of node attributes that belong to the same cluster
"list_node_attributes2" is a list of node attributes that belong to the same cluster
This method calculates how similar this two clusters are
Attention: this is the method that has to be overriden by the specific clustering you are implementing
- get_index_to_node_id(self)
- Method that returns the correspondence between
matrix indexes and GraphNode ids
- get_max_value(self)
- method that returns max value from
the similarity matrix
- get_node_id_by_index(self, number)
- Method that returns the correnspondendence betrween a given index to a node_id
- get_similarity_matrix(self, cluster_graph, dbaccess=None)
- Method that returns similarity matrix from a given cluster graph "cluster_graph"
each position in the matrix indicates how similar two clusters are.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'ClusteringSimilarityFunction' objects>
- list of weak references to the object (if defined)
|