Skip to main content

estimate_kernel_rank

Function estimate_kernel_rank 

Source
pub fn estimate_kernel_rank(
    kernel_matrix: &[Vec<f64>],
    variance_threshold: f64,
) -> Result<usize>
Expand description

Compute the effective dimensionality (rank) of a kernel matrix based on normalized eigenvalue spectrum.

This is useful for determining the intrinsic dimensionality of the data in kernel space.

§Arguments

  • kernel_matrix - Kernel matrix
  • variance_threshold - Cumulative variance threshold (e.g., 0.95 for 95%)

§Returns

  • Estimated rank (number of eigenvalues needed to reach threshold)

Note: This is a simplified estimate based on diagonal dominance. For accurate rank estimation, full eigendecomposition is needed.