
This package contains the Matlab code for the simulations and the real data example in the paper with title "Sparse subspace clustering in diverse multiplex network model".



Tested on Matlab R2018a.

********************************************************
Installation Note:

After you unzip SSC_DIMPLE_Matlab_Code.zip in mydir, change the Current Directory in Matlab to mydir



********************************************************
Files:

This package includes the following files:

*** AltMin.m performs the Alternating Minimization Algorithm (ALMA) for clustering a multilayer network

*** Clustering_Disconnected_Components.m performs the between-layer clustering algorithm introduced in the paper when the number of disconnected components in the Laplacian matrix is larger than the specified number of groups of layers

*** Data_DIMPLE.m generates networks following DIMPLE

*** Data_Trade.m generates the network from the Worldwide Food Trading dataset (Data_Trade.csv)

*** DIMPLE_mat_SPAM.m finds the coefficient matrix in the optimization problem for the Sparse Subspace Clustering procedure

*** DIMPLE_Spectral_Clustering.m performs the between-layer clustering algorithm introduced by Pensky and Wang which is based on spectral clustering

*** DIMPLE_SSC_ALMA_Run_Real_Data_Trade.m finds the groups of layers (the food products
traded among countries) in the Worldwide Food Trading Networks using the Sparse Subspace Clustering procedure and their associated communities (countries) within each group using the bias-adjusted clustering algorithm. It also finds the groups of layers (the food products
traded among countries) in the Worldwide Food Trading Networks using the the Alternating Minimization Algorithm (ALMA)

*** DIMPLE_SSC_Run_L_varies.m finds and displays the between-layer clustering errors using the Sparse Subspace Clustering procedure in networks that follow DIMPLE with the fixed number of nodes and different numbers of layers

*** DIMPLE_SSC_Run_n_varies.m finds and displays the between-layer clustering errors using the Sparse Subspace Clustering procedure in networks that follow DIMPLE with the fixed number of layers and different numbers of nodes

*** DIMPLE_SSC_SC_Run_L_varies.m finds and displays the between-layer clustering errors using the Sparse Subspace Clustering procedure and the spectral clustering based algorithm introduced by Pensky and Wang in networks that follow DIMPLE with the fixed number of nodes and different numbers of layers

*** DIMPLE_SSC_SC_Run_n_varies.m finds and displays the between-layer clustering errors using the Sparse Subspace Clustering procedure and the spectral clustering based algorithm introduced by Pensky and Wang in networks that follow DIMPLE with the fixed number of layers and different numbers of nodes

*** Rank_K_Approximation.m finds the rank K approximation of a given matrix



********************************************************
Dataset:

*** Data_Trade.csv contains the worldwide food trade data for 2018 extracted from the full normalized data which is available at:
https://www.fao.org/faostat/en/#data/TM 



********************************************************
Packages:

We used parts of the following packages:

*** SPAMS Matlab toolbox available at:
http://spams-devel.gforge.inria.fr/downloads.html

We solve the optimization problem in SSC procedure using the LARS algorithm implemented in this toolbox.


*** SSC_ADMM_v1.1 available at:
http://www.ccs.neu.edu/home/eelhami/codes

We use this package to build affinity matrices, perform spectral clustering, and calculate the clustering errors.
