chebyshev: Chebyshev distance

Description Usage Arguments Value Examples

View source: R/metrics.chebyshev.R

Description

Compute Chebyshev distance between two dataset or SparseHist X and Y

Usage

1
chebyshev(X, Y)

Arguments

X

[matrix or SparseHist] If matrix, dim = ( nrow = n_samples, ncol = n_features)

Y

[matrix or SparseHist] If matrix, dim = ( nrow = n_samples, ncol = n_features)

Value

[float] value of distance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
X = base::cbind( stats::rnorm(2000) , stats::rnorm(2000)  )
Y = base::cbind( stats::rnorm(2000,mean=2)  , stats::rnorm(2000) )
bw = base::c(0.1,0.1)
muX = SBCK::SparseHist( X , bw )
muY = SBCK::SparseHist( Y , bw )

## The four are equals
d = SBCK::chebyshev(  X ,   Y )
d = SBCK::chebyshev(muX ,   Y )
d = SBCK::chebyshev(  X , muY )
d = SBCK::chebyshev(muX , muY )

SBCK documentation built on April 10, 2021, 9:06 a.m.

Related to chebyshev in SBCK...