eigengap_heuristic: Heuristic to Calculate the Expected Number of Clusters based...

Description Usage Arguments Value

View source: R/scca_heuristic.R

Description

Given the spectrum (a set of sorted eigenvalues in descending order), eigengap_heuristic looks for the position of the largest gap (difference in value of 2 consecutive eigenvalues) in the spectrum, indicating the expected number of clusters to be found in the data. If N (N>= 2) eigenvalues are equal to 1, then N is the expected number of clusters The matrix of corresponding eigenvectors is also returned. The number of clusters and the matrix of eigenvectors can serve as an input for a clustering algorithm, e.g. kmeans. See also van Dam et al 2021 for further explanations.

Usage

1
eigengap_heuristic(eigenvalues, eigenvectors)

Arguments

eigenvalues

Numeric vector of sorted eigenvalues

eigenvectors

Numeric matrix containing eigenvectors (columns)

Value

A list with 3 elements

Y

Matrix with observations as input for kmeans

k

The position of largest gap or number the expected number of clusters in the data


UtrechtUniversity/SCCA documentation built on April 16, 2021, 3:23 a.m.