资源简介
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估计
相关资源
- 基于matlab的三维杆系有限元软件
- LTE小区搜索matlab仿真
- matlab图像边缘检测sobel算子梯度图像
- 相位调制 matlab
- 基于MATLAB卫星姿态建模自适应PID仿真
- MSK的matlab仿真
- 目标跟踪系统的MATLAB 源程序包
- 图像去噪的matlab代码
- matlab运动目标追踪
- polar码的SC译码算法matlab实现
- 粒子群优化的支持向量机matlab源代码
- 偏最小二乘算法多输入单输出系统
- 偏最小二乘算法交叉有效性准则调用
- matlab求取光斑中心
-
详解MATLAB-Simuli
nk通信系统建模与仿 - 指纹定位算法仿真matlab代码
- 三角级数法路面谱生成路面及与标准
- 目标跟踪算法KCF加入APCE评价标准的
- LEACH协议Matlab仿真代码
- 感知器与SVM分类
- qpsk在matlab上的仿真
- 利用Matlab编写,记录二值化图像像素
- 利用Matlab编写,记录二值化图像像素
- 元胞自动机交通流模拟matlab代码和相
- 帝国竞争算法ICA的matlab实现
- 连续域蚁群算法的matlab实现
- matlab小波去噪详解超全超全有程序.
- 图像追踪matlab
- 2019美赛B题代码
- 基于MATLAB的窗函数法设计FIR数字滤波
评论
共有 条评论