Contents

SCORE+ for Network Community Detection

The community detection problem where the number of communities are known can be solved by SCORE+ method, as shown here using SCOREplus function.

% *An example with Simmons dataset*
% Load data

load('simmons.mat')
fprintf('Loading simmons data...\n')
% set k, the number of communities to be 4
k = 4;
% ground truth (true label) to be compared
label = label - min(label) + 1;
Loading simmons data...

Example 1

Run the data with SCORE+ method. Find the corresponding estimated labels and error rate Run SCORE+, with default tuning parameter c (= 0.1) and without specifying latent dimension r, where Z is the predicted labels, error is the number of misclassified nodes/total # nodes.

tic;
Z = SCOREplus(A,k);
time = toc;

error = permloss(Z', label');
error_rate = error/length(label);
fprintf(' %d / %d are misclassified, error rate is %f. Takes %f s \n',error , length(label),error_rate, time)
 127 / 1137 are misclassified, error rate is 0.111697. Takes 3.218813 s 

Example 2

Run SCORE+, with tuning parameter c = 0.05 and without specifying latent dimension r, where Z is the predicted labels, error is the number of misclassified nodes/total # nodes.

tic;
Z = SCOREplus(A,k,0.05);
time = toc;

error = permloss(Z', label');
error_rate = error/length(label);
fprintf(' %d / %d are misclassified, error rate is %f. Takes %f s \n',error , length(label),error_rate, time)
 117 / 1137 are misclassified, error rate is 0.102902. Takes 2.869125 s 

Example 3

Run SCORE+, with tuning parameter c = 0.05 and latent dimension r = 4, where Z is the predicted labels, error is the number of misclassified nodes/total # nodes.

tic;
Z = SCOREplus(A,k,0.05,k);
time = toc;

error = permloss(Z', label');
error_rate = error/length(label);
fprintf(' %d / %d are misclassified, error rate is %f. Takes %f s \n',error , length(label),error_rate, time)
 219 / 1137 are misclassified, error rate is 0.192612. Takes 2.817060 s