Learn R Programming

parameters (version 0.15.0)

cluster_discrimination: Compute a linear discriminant analysis on classified cluster groups

Description

Computes linear discriminant analysis (LDA) on classified cluster groups, and determines the goodness of classification for each cluster group. See MASS::lda() for details.

Usage

cluster_discrimination(x, cluster_groups)

Arguments

x

A data frame

cluster_groups

Group classification of the cluster analysis, which can be retrieved from the cluster_analysis() function.

See Also

n_clusters() to determine the number of clusters to extract, cluster_analysis() to compute a cluster analysis and check_clusterstructure() to check suitability of data for clustering.

Examples

Run this code
# NOT RUN {
if (requireNamespace("MASS", quietly = TRUE)) {
  # retrieve group classification from hierarchical cluster analysis
  groups <- cluster_analysis(iris[, 1:4], n = 2)

  # goodness of group classificatoin
  cluster_discrimination(iris[, 1:4], cluster_groups = groups)
}
# }

Run the code above in your browser using DataLab