MyNixOS website logo
Description

Network-Based Clustering.

Network-based clustering using a Bayesian network mixture model with optional covariate adjustment.

clustNet: Network-based clustering with covariate adjustment

License: GPL v3

clustNet is an R package for network-based clustering of categorical data using a Bayesian network mixture model and optional covariate adjustment.

Installation

The package requires Rgraphviz and RBGL, which can be installed from Bioconductor as follows:

if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install(c("Rgraphviz", "RBGL"))

The latest stable version of clustNet is available on CRAN and can be installed with

install.packages("clustNet")

from within an R session. On a normal computer, this should take around 5-60 seconds, depending on how many of the required packages are already installed.

BiocManager::install("remotes")

Being hosted on GitHub, it is also possible to use the install_github tool from an R session to install the latest development version:

library("devtools")
install_github("cbg-ethz/clustNet")

clustNet requires R >= 3.5.

Example

library(clustNet)

# Simulate data
k_clust <- 3 # numer of clusters
ss <- c(400, 500, 600) # samples in each cluster
simulation_data <- sampleData(k_clust = k_clust, n_vars = 20, n_samples = ss)
sampled_data <- simulation_data$sampled_data

# Network-based clustering
cluster_results <- get_clusters(sampled_data, k_clust = k_clust)

# Load additional pacakges to visualize the networks
library(ggplot2)
library(ggraph)
library(igraph)
library(ggpubr)

# Visualize networks
plot_clusters(cluster_results)

# Load additional pacakges to create a 2d dimensionality reduction
library(car)
library(ks)
library(graphics)
library(stats)

# Plot a 2d dimensionality reduction
density_plot(cluster_results)

On a normal computer, the clustering should take around 2-4 minutes.

Metadata

Version

1.2.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows