get_clusters function

get_clusters

get_clusters

Network-based clustering

get_clusters( myData, k_clust = 3, n_bg = 0, quick = TRUE, EMseeds = 1, edgepmat = NULL, blacklist = NULL, bdepar = list(chi = 0.5, edgepf = 8), newallrelativeprobabs = NULL )

Arguments

  • myData: Data to be clustered, must be either binary (with levels "0"/"1") or categorical (with levels "0"/"1"/"2"/...)
  • k_clust: Number of clusters
  • n_bg: Number of covariates to be adjusted for; the position of the covariates must be in the last column of the myData matrix
  • quick: if TRUE, then the runtime is quick but accuracy is lower
  • EMseeds: Seeds
  • edgepmat: Matrix of penalized edges in the search space
  • blacklist: Matrix of forbidden edges in the search space
  • bdepar: Hyperparameters for structure learning (BDE score)
  • newallrelativeprobabs: relative probability of cluster assignment of each sample

Returns

a list containing the clusterMemberships and "assignprogress"

Examples

# choose data sampled_data <- sampleData(n_vars = 15, n_samples = c(300,300,300))$sampled_data # learn clusters cluster_results <- get_clusters(sampled_data) # visualize the networks library(ggplot2) library(ggraph) library(igraph) library(ggpubr) plot_clusters(cluster_results)
  • Maintainer: Fritz Bayer
  • License: GPL-3
  • Last published: 2024-02-14

Useful links