density_plot function

density_plot

density_plot

Create 2d dimensionality reduction of sample fit to Bayesian network clusters

density_plot(cluster_results, var_selection = NULL, colourys = NULL)

Arguments

  • cluster_results: Cluster results from function get_clusters
  • var_selection: Selected variables to consider, e.g. c(1:5) for first five only
  • colourys: A vector specifying the colors of each cluster (optional)

Returns

A density plot of class recordedplot.

Examples

# Simulate data sampled_data <- sampleData(n_vars = 15, n_samples = c(200,200,200))$sampled_data # Learn clusters cluster_results <- get_clusters(sampled_data) # Load additional pacakges to create a 2d dimensionality reduction library(car) library(ks) library(ggplot2) library(graphics) library(stats) # Plot a 2d dimensionality reduction density_plot(cluster_results)
  • Maintainer: Fritz Bayer
  • License: GPL-3
  • Last published: 2024-02-14

Useful links