laplacian_eigenmap: Laplacian eigenmaps

Description Usage Arguments Value Examples

View source: R/embeddr.R

Description

Construct a laplacian eigenmap embedding

Usage

1
2
laplacian_eigenmap(W, measure_type = c("unorm", "norm"), p = 2,
  eig_tol = 1e-10)

Arguments

W

The weighted graph adjacency matrix

measure_type

Type of laplacian eigenmap (norm for normalised, unorm otherwise)

p

Dimension of the embedded space, default is 2

eig_tol

The value below which an eigenvalue is deemed to be 0. Ideally these would all be .Machine$double.eps but numerical instabilities mean they are often larger. A good cutoff seems to be around 1e-10. If more than one zero eigenvalue is found but this is inconsistent with the number of connected clusters then the user will be warned to adjust eig_tol.

Value

A list containing two entries:

Examples

1
2
3
4
## create synthetic weight matrix
W <- matrix(sample(0:1, 25, replace = TRUE), nrow=5)
diag(W) <- 0 ; W <- 0.5*(W + t(W))
le <- laplacian_eigenmap(W) # returns a list with entries embedding and connected_components

kieranrcampbell/embeddr documentation built on May 20, 2019, 9:24 a.m.