SxMatrixCalc | R Documentation |
Largely a wrapper function for the stats::dist()
function. First calculates
n x n distance matrix using specified method for an input matrix or vector using
stats::dist()
. Then converts the distance matrix to similarity matrix using 1 / (D_x + 1).
SxMatrixCalc(A, XdistMetric = "euclidean")
A |
numeric matrix or numeric vector where the columns represents exogenous predictor variables and the rows correspond to the points in the response series. |
XdistMetric |
character describing the method |
numeric matrix of distances for A
.
X <- matrix(c(1, 1, 1, 2, 2, 2, 3, 3, 3), nrow = 3, ncol = 3, byrow = TRUE) SxMatrixCalc(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.