Class Jaccard<T>
Jaccard (Index) distance.
Inheritance
System.Object
Jaccard<T>
Implements
ISimilarity<T[]>
ISimilarity<T[], T[]>
IMetric<T[]>
IDistance<T[]>
IDistance<T[], T[]>
ICloneable
Namespace: Mars.Numerics.Distances
Assembly: Mars.Numerics.dll
Syntax
public class Jaccard<T> : object, ISimilarity<T[]>, ISimilarity<T[], T[]>, IMetric<T[]>, IDistance<T[]>, IDistance<T[], T[]>, ICloneable where T : IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the arrays to be compared. |
Remarks
The Jaccard index, also known as the Jaccard similarity coefficient (originally coined coefficient de communauté by Paul Jaccard), is a statistic used for comparing the similarity and diversity of sample sets. The Jaccard coefficient measures similarity between finite sample sets, and is defined as the size of the intersection divided by the size of the union of the sample sets.
References:
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Distance(T[], T[])
Computes the distance
d(x,y)
between points
x
and y
.
Declaration
public double Distance(T[] x, T[] y)
Parameters
Type | Name | Description |
---|---|---|
T[] | x | The first point x . |
T[] | y | The second point y . |
Returns
Type | Description |
---|---|
System.Double |
A double-precision value representing the distance d(x,y)
between x and y according
to the distance function implemented by this class.
|
Similarity(T[], T[])
Gets a similarity measure between two points.
Declaration
public double Similarity(T[] x, T[] y)
Parameters
Type | Name | Description |
---|---|---|
T[] | x | The first point to be compared. |
T[] | y | The second point to be compared. |
Returns
Type | Description |
---|---|
System.Double | A similarity measure between x and y. |
Implements
ICloneable