Sampling and network creation

sample_dcer()

Sample from a DCER

sample_dclvm()

Sample from a DCLVM

sample_dcpp()

Sample from a DCPP

sample_dcsbm()

Sample from a DCSBM

sample_tdcsbm()

Sample truncated DCSBM (fast)

fast_sbm()

Sample from a SBM (fast)

gen_rand_conn()

Generate randomly permuted connectivity matrix

get_dcsbm_exav_deg()

Calculate the expected average degree of a DCSBM

pp_conn()

Generate planted partition (PP) connectivity matrix

Community detection

Algorithms for community detection

fast_cpl()

CPL algorithm for community detection (fast)

spec_clust()

Spectral clustering (fast)

Model selection and testing

Tools for selecting the number of communities and testing goodness-of-fit of models

bethe_hessian_select()

Beth-Hessian model selection

eval_dcsbm_bic()

Compute BIC score

eval_dcsbm_loglr()

Log-likelihood ratio of two DCSBMs (fast with poi = T)

snac_select()

Estimate community number with SNAC+

adj_spec_test()

Adjusted spectral test

nac_test()

NAC test

snac_test()

SNAC test

snac_resample()

Resampled SNAC+

Model estimation

compute_block_sums()

Block sum of an adjacency matrix

estim_dcsbm()

Estimate model parameters of a DCSBM

eval_dcsbm_like()

Log likelihood of a DCSBM (fast with poi = T)

Network representation

spec_repr()

Spectral Representation

Performance Evaluation

compute_confusion_matrix()

Compute confusion matrix

compute_mutual_info()

Compute normalized mutual information (NMI)

simulate_roc()

Simulate data to estimate ROC curves

Plotting

plot_deg_dist()

Plot degree distribution

plot_net()

Plot a network

plot_roc()

Plot ROC curves

plot_smooth_profile()

Plot community profiles

Utilities

extract_largest_cc()

Extract largest component

extract_low_deg_comp()

Extract low-degree component

label_mat2vec()

Convert label matrix to vector

label_vec2mat()

Convert label vector to matrix

printf()

The usual "printf" function

rsymperm()

Generate random symmetric permutation matrix

sinkhorn_knopp()

Sinkhorn--Knopp matrix scaling

Data

polblogs

Political blogs network