cost_calc {approxOT} | R Documentation |
Calculate cost matrix
Description
Calculate cost matrix
Usage
cost_calc(X, Y, ground_p)
Arguments
X |
matrix of values in first sample. Observations should be by column, not rows. |
Y |
matrix of Values in second sample. Observations should be by column, not rows. |
ground_p |
power of the Lp norm to use in cost calculation. |
Value
matrix of costs
Examples
X <- matrix(rnorm(10*100), 10, 100)
Y <- matrix(rnorm(10*100), 10, 100)
# the Euclidean distance
cost <- cost_calc(X, Y, ground_p = 2)
[Package approxOT version 1.1.1 Index]