Learn R Programming

Spectrum (version 1.1)

estimate_k: estimate_k: estimate K using the eigengap or multimodality gap heuristics

Description

This function will try to estimate K given a similarity matrix. Generally the maximum eigengap is preferred, but on some data examining the distribution of the eigenvectors as in the multimodality gap heuristic may be beneficial.

Usage

estimate_k(A2, maxk = 10, showplots = TRUE)

Arguments

A2

Data frame or matrix: a similarity matrix

maxk

Numerical value: maximum number of K to be considered

showplots

Character value: whether to show the plot on the screen

Value

A data frame containing the eigenvalues and dip-test statistics of the eigenvectors of the graph Laplacian

Examples

Run this code
# NOT RUN {
k_test <- estimate_k(missl[[1]])
# }

Run the code above in your browser using DataLab