View source: R/helper-functions.R
laplacian | R Documentation |
An alternative distance function that can be used in LESS.
laplacian(data, center, coeff = 0.01)
data |
Data that includes points in shape of (M x d) |
center |
A constant point in shape of (1 x d) |
coeff |
Coefficient value for Laplacian kernel |
A numeric vector containing the laplacian kernel distance between each point in data and center.
data <- matrix(1:12, nrow=3) center <- c(2, 7, 1, 3) distances <- laplacian(data, center) print(distances)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.