日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

社区发现算法 | Louvain 算法 中的分辨率参数

發布時間:2023/12/10 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 社区发现算法 | Louvain 算法 中的分辨率参数 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 算法作者的網站

http://www.ludowaltman.nl/slm/

黑色字體的第二段末尾說,三種 Louvain 實現都支持 分辨率 參數,用來決定檢測到社區的粒度:
All algorithms implemented in the Modularity Optimizer support the use of a resolution parameter to determine the granularity level at which communities are detected.

手寫 Louvain 算法時,這個 分辨率 參數怎么體現呢?

是 deltaQ 小于某個值時迭代終止?

該網頁提供的代碼是java版本的:
http://www.ludowaltman.nl/slm/modularity_optimizer_source.zip
有用硬著頭皮看看吧。。。

(2) 分辨率參數的論文

通過其他地方的引用和介紹,多方證據印證,就是這篇論文引入的time 參數,后來被稱為 resolution 參數了。

  • How to use “resolution” when applying louvaon algorithm for community detection?

  • Louvain clustering: resolution parameter #3184

  • 分辨率 paper: Laplacian Dynamics and Multiscale Modular Structure in Networks : https://arxiv.org/abs/0812.1770
    Another paper Laplacian Dynamics and Multiscale Modular Structure in Networks that is referenced by the implementation of the python-louvain library refers to this as time.

  • NextworkX has a resolution parameter:

>>> community.best_partition(graph, partition=None, weight=’weight’, resolution=1.0, randomize=None, random_state=None)resolution [double, optional] Will change the size of the communities, default to 1. represents the time described in “Laplacian Dynamics and Multiscale Modular Structure in Networks”, R. Lambiotte, J.-C. Delvenne, M. Barahona
  • 也有文章討論 resolution 的局限性: Narrow scope for resolution-limit-free community detection | 2011 pdf | pdf2 | pubmed

(3) Rigraph 上的爭論

https://github.com/igraph/rigraph/issues/239
觀眾: 原算法作者的java代碼支持 分辨率,希望R版本的 igraph 也支持: http://www.ludowaltman.nl/slm/
igraph 作者: R包Seurat已經通過Rcpp支持了。

觀眾: 不行,我就要,防止代碼擴散嘛
作者: Rigraph 打算在支持 Leiden 算法時添加分辨率參數。

最后,有人提交了一個C版本的PR: (commented on 2 Jun 2020)
https://github.com/jmonlong/Hippocamplus/blob/config/R/rigraph_gammalouvain/community.c


2. 其他短小的python 實現

(1) 實現1: 沒有 resolution 參數

https://blog.csdn.net/qq_16543881/article/details/122825957
這個有問題,小數據集看著還行;
但是對于 3000 個頂點的 pbmc 3k 真實數據集,直接輸出了和點數一樣的社區數,肯定哪里不對。
修正版: Louvain_5.py


ref:

  • 介紹 Louvain 算法及其實現 https://zhuanlan.zhihu.com/p/522751212
  • 幾篇 Louvain 的論文的區別: https://blog.csdn.net/qq_16543881/article/details/123575014
  • Louvain 2018: https://eecs.wsu.edu/~ananth/papers/Ghosh_IPDPS18.pdf
  • java 版的調試: https://blog.51cto.com/u_15693947/5409361

總結

以上是生活随笔為你收集整理的社区发现算法 | Louvain 算法 中的分辨率参数的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。