networkx.algorithms.link_analysis.hits_alg.hits_scipy
的用法。用法:
hits_scipy(G, max_iter=100, tol=1e-06, nstart=None, normalized=True)
返回節點的 HITS 集線器和權限值。
自 2.6 版起已棄用:hits_scipy 已棄用,將在 networkx 3.0 中刪除
HITS 算法計算一個節點的兩個數字。當局根據傳入鏈接估計節點值。 Hubs 根據傳出鏈接估計節點值。
- G:圖形
NetworkX 圖
- max_iter:整數,可選
冪法中的最大迭代次數。
- tol:浮點數,可選
誤差容限用於檢查冪法迭代中的收斂性。
- nstart:字典,可選
冪法迭代每個節點的起始值。
- normalized:布爾(默認=真)
通過所有值的總和對結果進行歸一化。
- (hubs,authorities):字典的二元組
由節點鍵入的兩個字典,包含中心值和權限值。
- PowerIterationFailedConvergence
如果算法在冪迭代法的指定迭代次數內未能收斂到指定的容差。
參數:
返回:
拋出:
注意:
此實現使用SciPy 稀疏矩陣。
特征向量計算是通過冪迭代法完成的,不能保證收斂。迭代將在max_iter 迭代或達到number_of_nodes(G)*tol 的容錯後停止。
HITS 算法是為有向圖設計的,但該算法不檢查輸入圖是否有向,並將在無向圖上執行。
參考:
- 1
A. Langville and C. Meyer, “A survey of eigenvector methods of web information retrieval.” http://citeseer.ist.psu.edu/713792.html
- 2
Jon Kleinberg, Authoritative sources in a hyperlinked environment Journal of the ACM 46 (5): 604-632, 1999. doi:10.1145/324133.324140. http://www.cs.cornell.edu/home/kleinber/auth.pdf.
例子:
>>> G = nx.path_graph(4) >>> h, a = nx.hits(G)
相關用法
- Python NetworkX hits_numpy用法及代碼示例
- Python NetworkX hits用法及代碼示例
- Python NetworkX harmonic_function用法及代碼示例
- Python NetworkX has_bridges用法及代碼示例
- Python NetworkX negative_edge_cycle用法及代碼示例
- Python NetworkX voronoi_cells用法及代碼示例
- Python NetworkX numerical_edge_match用法及代碼示例
- Python NetworkX inverse_line_graph用法及代碼示例
- Python NetworkX LFR_benchmark_graph用法及代碼示例
- Python NetworkX write_graph6用法及代碼示例
- Python NetworkX DiGraph.__contains__用法及代碼示例
- Python NetworkX average_degree_connectivity用法及代碼示例
- Python NetworkX eulerian_circuit用法及代碼示例
- Python NetworkX single_source_dijkstra_path_length用法及代碼示例
- Python NetworkX from_dict_of_dicts用法及代碼示例
- Python NetworkX weisfeiler_lehman_subgraph_hashes用法及代碼示例
- Python NetworkX transitive_closure_dag用法及代碼示例
- Python NetworkX intersection用法及代碼示例
- Python NetworkX MultiGraph.size用法及代碼示例
- Python NetworkX Graph.size用法及代碼示例
- Python NetworkX from_scipy_sparse_array用法及代碼示例
- Python NetworkX local_and_global_consistency用法及代碼示例
- Python NetworkX number_of_selfloops用法及代碼示例
- Python NetworkX single_source_bellman_ford用法及代碼示例
- Python NetworkX all_simple_paths用法及代碼示例
注:本文由純淨天空篩選整理自networkx.org大神的英文原創作品 networkx.algorithms.link_analysis.hits_alg.hits_scipy。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。