Description Usage Arguments Value
View source: R/forward_methods.R
A distance function that, unlike the built-in dist: 1) Returns a matrix instead of a dist object (I need the diagonals for inner prod distance) 2) Allows for custom distance function specification.
1 |
X |
An n by p real valued matrix, rows representing observations, columns representing features. A distance matrix will be computed along its rows. |
dist.func |
A function which accepts two arguments: two rows X, and returns a distance (or generalized distance) between them. |
weights |
Either a length p nonnegative vector or NULL. If not null, the ith column of X will be scaled by the root of the ith element of weights prior to distance calculation. If not, no scaling will occur. |
symm |
Is the distance function symmetric? If so, we can skip a bunch of function evaluations. Default is FALSE. |
An n by n matrix of distances, element i,j of which being the result of dist.func applied to rows i and j.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.