资源简介
LOUVAIN——社交网络挖掘之大规模网络的社区发现算法,matlab实现版本,输入n*n矩阵,输出划分结果及q值
代码片段和文件信息
function [MQ]=community_louvain(WgammaM0B)
%COMMUNITY_LOUVAIN Optimal community structure
%
% M = community_louvain(W);
% [MQ] = community_louvain(Wgamma);
% [MQ] = community_louvain(WgammaM0);
% [MQ] = community_louvain(WgammaM0‘potts‘);
% [MQ] = community_louvain(WgammaM0‘negative_asym‘);
% [MQ] = community_louvain(W[][]B);
%
% The optimal community structure is a subdivision of the network into
% nonoverlapping groups of nodes which maximizes the number of within-
% group edges and minimizes the number of between-group edges.
%
% This function is a fast and accurate multi-iterative generalization of
% the Louvain community detection algorithm. This function subsumes and
% improves upon
% modularity_louvain_und.m modularity_finetune_und.m
% modularity_louvain_dir.m modularity_finetune_dir.m
% modularity_louvain_und_sign.m
% and additionally allows to optimize other objective functions (includes
% built-in Potts-model Hamiltonian allows for custom objective-function
% matrices).
%
% Inputs:
% W
% directed/undirected weighted/binary connection matrix with
% positive and possibly negative weights.
% gamma
% resolution parameter (optional)
% gamma>1 detects smaller modules
% 0<=gamma<1 detects larger modules
% gamma=1 classic modularity (default)
% M0
% initial community affiliation vector (optional)
% B
% objective-function type or custom objective matrix (optional)
% ‘modularity‘ modularity (default)
% ‘potts‘ Potts-model Hamiltonian (for binary networks)
% ‘negative_sym‘ symmetric treatment of negative weights
% ‘negative_asym‘ asymmetric treatment of negative weights
% B custom objective-function matrix
%
% Note: see Rubinov and Sporns (2011) for a discussion of
% symmetric vs. asymmetric treatment of negative weights.
%
% Outputs:
% M
% community affiliation vector
% Q
% optimized community-structure statistic (modularity by default)
%
% Example:
% % Iterative community finetuning.
% % W is the input connection matrix.
% n = size(W1); % number of nodes
% M = 1:n; % initial community affiliations
% Q0 = -1; Q1 = 0; % initialize modularity values
% while Q1-Q0>1e-5; % while modularity increases
% Q0 = Q1; % perform community detection
% [M Q1] = community_louvain(W [] M);
% end
%
% References:
% Blondel et al. (2008) J. Stat. Mech. P10008.
% Reichardt and Bornholdt (2006) Phys. Rev. E 74 016110.
% Ronhovde and Nussinov (2008) Phys. Rev. E 80 016109
% Sun et al. (2008) Europhysics Lett 86 28004.
% Rubinov and Sporns (2011)
- 上一篇:基于matlab的三维杆系有限元软件
- 下一篇:mucis算法实现DOA估计
相关资源
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
评论
共有 条评论