用法:
cugraph.community.spectral_clustering.analyzeClustering_ratio_cut(G, n_clusters, clustering, vertex_col_name='vertex', cluster_col_name='cluster')
計算分區/聚類的比率削減分數
- G:cugraph.Graph
cuGraph 圖說明符。這個圖應該有邊權重。
- n_clusters:整數
指定給定聚類中的聚類數
- clustering:cudf.DataFrame
要分析的集群分配。
- vertex_col_name:str,可選(默認='頂點')
聚類 DataFrame 中標識外部頂點 ID 的列的名稱
- cluster_col_name:str,可選(默認='cluster')
聚類 DataFrame 中的列的名稱,用於標識集群 ID
- score:浮點數
計算的比率削減分數
參數:
返回:
例子:
>>> M = cudf.read_csv(datasets_path / 'karate.csv', ... delimiter = ' ', ... dtype=['int32', 'int32', 'float32'], ... header=None) >>> G = cugraph.Graph() >>> G.from_cudf_edgelist(M, source='0', destination='1', edge_attr='2') >>> df = cugraph.spectralBalancedCutClustering(G, 5) >>> score = cugraph.analyzeClustering_ratio_cut(G, 5, df, 'vertex', ... 'cluster')
相關用法
- Python cugraph.community.spectral_clustering.analyzeClustering_modularity用法及代碼示例
- Python cugraph.community.spectral_clustering.analyzeClustering_edge_cut用法及代碼示例
- Python cugraph.community.spectral_clustering.spectralBalancedCutClustering用法及代碼示例
- Python cugraph.community.spectral_clustering.spectralModularityMaximizationClustering用法及代碼示例
- Python cugraph.community.subgraph_extraction.subgraph用法及代碼示例
- Python cugraph.community.ecg.ecg用法及代碼示例
- Python cugraph.community.louvain.louvain用法及代碼示例
- Python cugraph.community.egonet.batched_ego_graphs用法及代碼示例
- Python cugraph.community.triangle_count.triangles用法及代碼示例
- Python cugraph.community.ktruss_subgraph.ktruss_subgraph用法及代碼示例
- Python cugraph.community.egonet.ego_graph用法及代碼示例
- Python cugraph.community.leiden.leiden用法及代碼示例
- Python cugraph.components.connectivity.strongly_connected_components用法及代碼示例
- Python cugraph.components.connectivity.connected_components用法及代碼示例
- Python cugraph.components.connectivity.weakly_connected_components用法及代碼示例
- Python cugraph.cores.k_core.k_core用法及代碼示例
- Python cugraph.cores.core_number.core_number用法及代碼示例
- Python cugraph.centrality.betweenness_centrality.betweenness_centrality用法及代碼示例
- Python cugraph.centrality.betweenness_centrality.edge_betweenness_centrality用法及代碼示例
- Python cugraph.centrality.katz_centrality.katz_centrality用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cugraph.community.spectral_clustering.analyzeClustering_ratio_cut。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。