density_plot {clustNet}R Documentation

density_plot

Description

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

Usage

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)

Value

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)


[Package clustNet version 1.2.0 Index]