Learn R Programming

FSMUMI (version 1.0)

compute.ed: Euclidean distance (ED)

Description

Compute the Euclidean distance between two vectors having the same length Y and X.

Usage

compute.ed(Y, X)

Arguments

Y

vector of imputed values

X

vector of true values

Details

This function returns the Euclidean distance of two vectors corresponding to univariate signals. A lower ED (\(ED \in [0, \inf]\)) value indicates that the two vectors are more similar. The both vectors Y and X must be of equal length, on the contrary an error will be displayed. In two input vectors, eventual NA will be exluded with a warning diplayed.

Examples

Run this code
# NOT RUN {
data(dataFSMUMI)
X <- dataFSMUMI[, 1] ; Y <- dataFSMUMI[, 2]
compute.ed(Y,X)
# }

Run the code above in your browser using DataLab