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 )
myData
: Data to be clustered, must be either binary (with levels "0"/"1") or categorical (with levels "0"/"1"/"2"/...)k_clust
: Number of clustersn_bg
: Number of covariates to be adjusted for; the position of the covariates must be in the last column of the myData matrixquick
: if TRUE, then the runtime is quick but accuracy is lowerEMseeds
: Seedsedgepmat
: Matrix of penalized edges in the search spaceblacklist
: Matrix of forbidden edges in the search spacebdepar
: Hyperparameters for structure learning (BDE score)newallrelativeprobabs
: relative probability of cluster assignment of each samplea list containing the clusterMemberships and "assignprogress"
# 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)
Useful links