compute.sim: Similarity

Description Usage Arguments Details Author(s) Examples

Description

Estimates the percentage of similarity of two univariate signals Y (imputed values) and X (true values).

Usage

1

Arguments

Y

vector of imputed values

X

vector of true values

Details

This function returns the value of similarity of two vectors corresponding to univariate signals. A higher similarity (Similarity \in [0, 1]) highlights a more accurate method for completing missing values in univariate datasets. Both vectors Y and X must be of equal length, on the contrary an error will be displayed. In both input vectors, eventual NA will be excluded with a warning diplayed.

Author(s)

Camille Dezecache, Hong T. T. Phan, Emilie Poisson-Caillault

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(dataDTWBI)
X <- dataDTWBI[, 1] ; Y <- dataDTWBI[, 2]
compute.sim(Y,X)

# By definition, if true values is a constant vector
# and one or more imputed values are equal to the true values,
# similarity = 1.
X <- rep(2, 10)
Y <- X
compute.sim(Y,X)

DTWBI documentation built on May 2, 2019, 1:59 a.m.