View source: R/cost_calculation.R
cost_calc | R Documentation |
Calculate cost matrix
cost_calc(X, Y, ground_p)
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. |
matrix of costs
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.