cost_calc: Calculate cost matrix

View source: R/cost_calculation.R

cost_calcR 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)

approxOT documentation built on May 29, 2024, 3:12 a.m.