List of all classes, functions and methods in python-igraph
class VertexDendrogram(Dendrogram):
The dendrogram resulting from the hierarchical clustering of the vertex set of a graph.
Method | __init__ |
Creates a dendrogram object for a given graph. |
Method | as_clustering |
Cuts the dendrogram at the given level and returns a corresponding VertexClustering object. |
Property | optimal_count |
Returns the optimal number of clusters for this dendrogram. |
Method | optimal_count.setter |
Undocumented |
Method | __plot__ |
Draws the vertex dendrogram on the given Cairo context |
Instance Variable | _graph |
Undocumented |
Instance Variable | _optimal_count |
Undocumented |
Instance Variable | _modularity_params |
Undocumented |
Instance Variable | _names |
Undocumented |
Inherited from Dendrogram
:
Method | __str__ |
Undocumented |
Method | format |
Formats the dendrogram in a foreign format. |
Method | summary |
Returns the summary of the dendrogram. |
Property | merges |
Returns the performed merges in matrix format |
Property | names |
Returns the names of the nodes in the dendrogram |
Method | names.setter |
Sets the names of the nodes in the dendrogram |
Instance Variable | _merges |
Undocumented |
Instance Variable | _nmerges |
Undocumented |
Instance Variable | _nitems |
Undocumented |
Static Method | _convert_matrix_to_tuple_repr |
Converts the matrix representation of a clustering to a tuple representation. |
Method | _traverse_inorder |
Conducts an inorder traversal of the merge tree. |
Method | _item_box_size |
Calculates the amount of space needed for drawing an individual vertex at the bottom of the dendrogram. |
Method | _plot_item |
Plots a dendrogram item to the given Cairo context |
igraph.clustering.Dendrogram.__init__
Creates a dendrogram object for a given graph.
Parameters | graph | the graph that will be associated to the clustering |
merges | the merges performed given in matrix form. | |
optimal_count | the optimal number of clusters where the dendrogram should be cut. This is a hint usually provided by the clustering algorithm that produces the dendrogram. None means that such a hint is not available; the optimal count will then be selected based on the modularity in such a case. | |
params | additional parameters to be stored in this object. | |
modularity_params | arguments that should be passed to Graph.modularity when the modularity is (re)calculated. If the original graph was weighted, you should pass a dictionary containing a weight key with the appropriate value here. |
Cuts the dendrogram at the given level and returns a corresponding VertexClustering
object.
Parameters | n | the desired number of clusters. Merges are replayed from the beginning until the membership vector has exactly n distinct elements or until there are no more recorded merges, whichever happens first. If None , the optimal count hint given by the clustering algorithm will be used If the optimal count was not given either, it will be calculated by selecting the level where the modularity is maximal. |
Returns | a new VertexClustering object. |
Returns the optimal number of clusters for this dendrogram.
If an optimal count hint was given at construction time, this property simply returns the hint. If such a count was not given, this method calculates the optimal number of clusters by maximizing the modularity along all the possible cuts in the dendrogram.
igraph.clustering.Dendrogram.__plot__
Draws the vertex dendrogram on the given Cairo context
See Dendrogram.__plot__
for the list of supported keyword arguments.