add_clustering_to_rag
legacy Older CSD-based clustering; env_cluster typing is more accurate. Use add_env_cluster_pocket_types_to_rag instead.
compute.add_clustering_to_rag(
rag2,
return_cluster_obj=False,
no_pbc=False,
**kwargs,
)Agglomeratively cluster RAG node feature vectors and write cluster labels on nodes.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| rag2 | The rag2 parameter in the add_clustering_to_rag function is expected to be a NetworkX graph object representing a region adjacency graph (RAG) with nodes and attributes. This graph is used to perform clustering on the data associated with the nodes in the graph |
required | |
| return_cluster_obj | The return_cluster_obj parameter in the add_clustering_to_rag function determines whether the function should return the clustering object along with the modified graph (rag2) or just the modified graph itself, defaults to False (optional) |
False |
|
| no_pbc | The no_pbc parameter in the add_clustering_to_rag function is a boolean flag that specifies whether to use data without periodic boundary conditions (PBC). If no_pbc is set to True, the function will use data without PBC, while if it, defaults to False (optional) |
False |
Returns
| Name | Type | Description |
|---|---|---|
If return_cluster_obj is set to True, the function will return a tuple containing the updated RAG (rag2) and the clustering object (clustering). If return_cluster_obj is set to False, the function will return just the updated RAG (rag2). |