scms: KDE-based Subspace Constrained Mean Shift

Description Usage Arguments Details Value References

View source: R/SCMS.R

Description

Compuational complexity per step: O(M * N * n^3), where M is for every query point, N for every data point, n^3 for eigen-decomposition. If partial/truncated eigen-decomposition is used, the n^3 term would become d*n^2 (e.g. the Lanczos algorithm, which further reduces by the sparsity of the matrix).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
scms(
  Y0,
  X,
  d,
  h,
  log = TRUE,
  r = NULL,
  omega = 1,
  maxStep = NULL,
  minCos = 0.01,
  maxIter = 100L,
  returnV = FALSE,
  silent = FALSE
)

Arguments

Y0

Initial points, an n-by-M matrix.

X

Data, an n-by-N matrix.

d

Dimension of the density ridge, an integer.

h

Bandwidth for isotropic Gaussian kernel density estimation, a scalar.

log

Whether to use the log Gaussian KDE. Default to TRUE.

r

Radius of nearest neighbors to use in evaluating density and derivatives. Default to use all data.

omega

Stepsize relaxation factor.

maxStep

Maximum stepsize. You probably don't need to use both 'omega' and 'maxStep'.

minCos

Convergence criterion, cosine of the angle between gradient and its component in the "local normal space".

maxIter

Maximum number of iterations.

returnV

Whether to return the eigenvector at Y; an (n,n,M) array.

Details

In the return, 'lambdaNormal' and 'eigengap' are both useful for checking if the final point is a ridge point.

Value

A list: 'Y', the final points; 'cosNormal', convergence score; 'lambdaNormal', largest Hessian eigenvalue in the normal space; 'eigengap', d-th eigengap of the Hessian; 'updatedPoints', the number of updated points per update;

References

[@Ozertem2011]


rudazhang/plmr documentation built on Aug. 30, 2021, 5:43 p.m.