A software package for motif-based spectral clustering of weighted directed networks.

First written for my master’s thesis under Mihai Cucuringu at the Department of Statistics, University of Oxford, motifcluster was further developed alongside a preprint (arXiv:2004.01293) authored by W. G. Underwood, A. Elliott, and M. Cucuringu. It is available on GitHub for R and Python.

The motifcluster packages for R and Python provide the capability for:

  • Building motif adjacency matrices
  • Sampling random weighted directed networks
  • Spectral embedding with motif adjacency matrices
  • Motif-based spectral clustering

The methods are all designed to run quickly on large sparse networks, and are easy to install and use.

R package

The motifcluster package was originally written in R.

Installation

The R package can be installed from CRAN with:

install.packages("motifcluster")

Documentation

The package’s manual is in the R/doc directory on GitHub. An instructional vignette is in the R/vignettes directory on GitHub.

Python

The motifcluster package is now also available in Python. This offers some improved performance over the R package, though the functionality is the same.

Installation

The Python package can be installed from PyPI with:

pip install motifcluster

Documentation

Full documentation is available at motifcluster.readthedocs.io.