Euclidean similarity metric.

Namespace:  AForge.Math.Metrics
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public sealed class EuclideanSimilarity : ISimilarity

Remarks

This class represents the Euclidean Similarity metric, which is calculated as 1.0 / ( 1.0 + EuclideanDistance ).

Sample usage:

CopyC#
// instantiate new similarity class
EuclideanSimilarity sim = new EuclideanSimilarity( ); 
// create two vectors for inputs
double[] p = new double[] { 2.5, 3.5, 3.0, 3.5, 2.5, 3.0 };
double[] q = new double[] { 3.0, 3.5, 1.5, 5.0, 3.5, 3.0 };
// get simirarity between the two vectors
double similarityScore = sim.GetSimilarityScore( p, q );

Inheritance Hierarchy

System..::.Object
  AForge.Math.Metrics..::.EuclideanSimilarity

See Also