用法:
cugraph.link_analysis.hits.hits(G, max_iter=100, tol=1e-05, nstart=None, normalized=True)
計算每個頂點的 HITS 集線器和權限值
HITS 算法計算一個節點的兩個數字。當局根據傳入鏈接估計節點值。 Hubs 根據傳出鏈接估計節點值。
HITS 的 cuGraph 實現是圍繞 HITS 的 gunrock 實現的包裝。
請注意,gunrock 實現使用 2-norm,而 networkx 使用 1-norm。原始分數會有所不同,但排名順序應該與 networkx 相當。
- graph:cugraph.Graph
cuGraph 圖說明符,應包含作為邊列表的連接信息(此算法不使用邊權重)。如果不存在鄰接列表,則將計算該鄰接列表。
- max_iter:int,可選(默認=100)
返回答案之前的最大迭代次數。 gunrock 實現目前不支持容差,因此這實際上是 HITS 算法執行的迭代次數。
- tol:浮點數,可選(默認=1.0e-5)
設置容差的近似值,這個參數應該是一個小的幅度值。目前不支持該參數。
- nstart:cudf.Dataframe,可選(默認=無)
目前不支持
- normalized:布爾,可選(默認=真)
當前不支持,始終用作 True
- HubsAndAuthorities:cudf.DataFrame
GPU 數據幀包含三個大小為 V 的 cudf.Series:頂點標識符和相應的集線器值和相應的權限值。
- df[‘vertex’]:cudf.Series
包含頂點標識符
- df[‘hubs’]:cudf.Series
包含集線器分數
- df[‘authorities’]:cudf.Series
包含當局分數
參數:
返回:
例子:
>>> gdf = cudf.read_csv(datasets_path / 'karate.csv', delimiter=' ', ... dtype=['int32', 'int32', 'float32'], header=None) >>> G = cugraph.Graph() >>> G.from_cudf_edgelist(gdf, source='0', destination='1') >>> hits = cugraph.hits(G, max_iter = 50)
相關用法
- Python cugraph.link_analysis.pagerank.pagerank用法及代碼示例
- Python cugraph.link_prediction.jaccard.jaccard用法及代碼示例
- Python cugraph.link_prediction.wjaccard.jaccard_w用法及代碼示例
- Python cugraph.link_prediction.woverlap.overlap_w用法及代碼示例
- Python cugraph.link_prediction.overlap.overlap用法及代碼示例
- Python cugraph.link_prediction.jaccard.jaccard_coefficient用法及代碼示例
- Python cugraph.linear_assignment.hungarian用法及代碼示例
- Python cugraph.community.spectral_clustering.spectralBalancedCutClustering用法及代碼示例
- Python cugraph.community.ecg.ecg用法及代碼示例
- Python cugraph.Graph.from_cudf_adjlist用法及代碼示例
- Python cugraph.community.louvain.louvain用法及代碼示例
- Python cugraph.tree.minimum_spanning_tree.maximum_spanning_tree用法及代碼示例
- Python cugraph.centrality.betweenness_centrality.betweenness_centrality用法及代碼示例
- Python cugraph.dask.community.louvain.louvain用法及代碼示例
- Python cugraph.traversal.bfs.bfs用法及代碼示例
- Python cugraph.community.egonet.batched_ego_graphs用法及代碼示例
- Python cugraph.tree.minimum_spanning_tree.minimum_spanning_tree用法及代碼示例
- Python cugraph.Graph.from_cudf_edgelist用法及代碼示例
- Python cugraph.centrality.betweenness_centrality.edge_betweenness_centrality用法及代碼示例
- Python cugraph.components.connectivity.strongly_connected_components用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cugraph.link_analysis.hits.hits。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。