Identifies the index of maximum perpendicular distance from the line connecting the first and last points of the eigenvalue sequence.

FindKneePoint(eigval, plot.fig = FALSE)

Arguments

eigval

Numeric vector of eigenvalues (typically in descending order).

plot.fig

Logical. If TRUE, plots the eigenvalue curve and marks the knee point. Default FALSE.

Value

An integer giving the index of the knee point.

Examples

if (FALSE) {
k <- FindKneePoint(evd$values, plot.fig = TRUE)
}