euclidean_distance {OutliersLearn} | R Documentation |
euclidean_distance
Description
This function calculates the euclidean distance between 2 points. They must have the same number of dimensions
Usage
euclidean_distance(p1, p2)
Arguments
p1 |
One of the points that will be used by the algorithm with N dimensions |
p2 |
The other point that will be used by the algorithm with N dimensions |
Value
Euclidean Distance calculated between the two N-dimensional points
Author(s)
Andres Missiego Manjon
Examples
inputData = t(matrix(c(3,2,3.5,12,4.7,4.1,5.2,
4.9,7.1,6.1,6.2,5.2,14,5.3),2,7,dimnames=list(c("r","d"))));
inputData = data.frame(inputData);
point1 = inputData[1,];
point2 = inputData[4,];
distance = euclidean_distance(point1, point2);
[Package OutliersLearn version 1.0.0 Index]