Learn R Programming

hyperSpec (version 0.98-20140523)

pearson.dist: Distance based on Pearson's $R^2$

Description

The calculated distance is $D^2 = \frac{1 - COR (\code{x}')}{2}$

Usage

pearson.dist(x)

Arguments

x
a matrix

Value

  • distance matrix (distance object)

Details

The distance between the rows of x is calculated. The possible values range from 0 (prefectly correlated) over 0.5 (uncorrelated) to 1 (perfectly anti-correlated).

References

S. Theodoridis and K. Koutroumbas: Pattern Recognition, 3rd ed., p. 495

See Also

as.dist

Examples

Run this code
dist <- pearson.dist (flu[[]])
dist <- pearson.dist (flu)

Run the code above in your browser using DataLab