R/utils.R
eval_distance.Rd
This function serves as an evaluation wrapper for some distance function. It checks that the output
of distance_function
is a numeric
matrix with nrow(x)
rows and nrow(y)
columns as expected.
eval_distance(distance_function, x, y, data = NULL)
(function()
)
A distance function to evaluate.
(data.frame() | numeric()
)
A matrix or a data frame containing variables that should be used in the computation of the distance.
(data.frame() | numeric()
)
A matrix or a data.frame containing variables that should be used in the computation of the distance.
(data.frame()
| NULL
)
A data.frame or data.table containing the entire data set. This can be used to compute statistics used in the
computation of the distance, e.g., standard deviation or range.