Skip to contents

d = 1 - r with r the Pearson correlation of the two profiles over the features (the correlation proximity of ESL sec 14.3.3).

Usage

correlation_dist(x, y)

Arguments

x, y

Profiles of equal length (>= 2).

Value

Named list: estimate (1 - r), pearson_r, dim.

References

Hastie, Tibshirani & Friedman (2009), sec. 14.3.3.

Examples

correlation_dist(c(1, 2, 4, 3), c(2, 1, 5, 5))$estimate
#> [1] 0.1859084