jhpro.nnet.jknnl
Class EuclidesMetric
- java.lang.Object
-
- jhpro.nnet.jknnl.EuclidesMetric
-
- All Implemented Interfaces:
- MetricModel
public class EuclidesMetric extends java.lang.Object implements MetricModel
Euclid metric return distance calculated by function: sum[sqrt(x_i - y_i)] for each element from inputs vectors, where x_i is first input vector element, y_i is second vector element.
-
-
Constructor Summary
Constructors Constructor and Description EuclidesMetric()Creates a new instance of CityBlockMetric
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetDistance(double[] firstVector, double[] secondVector)Return value containing the distance information.
-
-
-
Method Detail
-
getDistance
public double getDistance(double[] firstVector, double[] secondVector)Return value containing the distance information. firstVector vector and secondVector must have the same size otherwise function return -1- Specified by:
getDistancein interfaceMetricModel- Parameters:
firstVector- first vectorsecondVector- second vector- Returns:
- distance information
-
-
DMelt 3.0 © DataMelt by jWork.ORG