| euclidean {SBCK} | R Documentation | 
Euclidean distance
Description
Compute Euclidean distance between two dataset or SparseHist X and Y
Usage
euclidean(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
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::euclidean(  X ,   Y )
d = SBCK::euclidean(muX ,   Y )
d = SBCK::euclidean(  X , muY )
d = SBCK::euclidean(muX , muY )
[Package SBCK version 1.0.0 Index]