Wasserstein.diss {provenance} | R Documentation |
Wasserstein distance
Description
Returns the Wasserstein distance between two samples
Usage
Wasserstein.diss(x, ...)
## Default S3 method:
Wasserstein.diss(x, y, ...)
## S3 method for class 'distributional'
Wasserstein.diss(x, log = FALSE, ...)
## S3 method for class 'varietal'
Wasserstein.diss(x, package = "transport", verbose = FALSE, ...)
Arguments
x |
the first sample as a vector |
... |
optional arguments to the
|
y |
the second sample as a vector |
log |
logical. Take the lograthm of the data before calculating the distances? |
package |
the name of the package that provides the 2D
Wasserstein distance. Currently, this can be either
|
verbose |
logical. If |
Value
a scalar value
Author(s)
The default S3 method was written by Pieter Vermeesch,
using modified code from Dominic Schuhmacher's transport
package (transport1d
function), as implemented in
IsoplotR
.
Examples
data(Namib)
print(Wasserstein.diss(Namib$DZ$x[['N1']],Namib$DZ$x[['T8']]))
[Package provenance version 4.3 Index]