Learn R Programming

graphclust (version 1.3)

graphMomentsClustering: Graph clustering method using graph moments

Description

Graph clustering method based on graph moments by Mukherjee et al. (2017)

Usage

graphMomentsClustering(Networks, nbMoments = 3, nbClusters)

Value

vector with the clustering of the networks

Arguments

Networks

list of adjacency matrices

nbMoments

order of the largest graph moments to be considered

nbClusters

desired number of clusters

Examples

Run this code
param <- vector('list', 3)
param[[1]] <- list(prop = 1/3, # component 1 :  alpha > beta
                   alpha = .04,
                   beta = .02,
                   deltaIn = 100,
                   deltaOut = 100,
                   R = 500
)
param[[2]] <- list(prop = 1/3, # component 2 : just permute alpha and beta ;
                   alpha = .01,
                   beta = .02,
                   deltaIn = 100,
                   deltaOut = .1,
                   R = 1000
)
param[[3]] <- list(prop = 1/3, # component 3 : alpha=beta
                   alpha = .015,
                   beta = .015,
                   deltaIn = .1,
                   deltaOut = .1,
                   R = 1000
)
obs <- sampleDPAMixture(M=20, param)
res <- graphMomentsClustering(obs$listAdj, 3, 3)
table(res, obs$graphGroups)

Run the code above in your browser using DataLab