Click or drag to resize
Accord.NET (logo)

ToolsDistance Method

Computes the kernel distance for a kernel function even if it doesn't implement the IDistance interface. Can be used to check the proper implementation of the distance function.

Namespace:  Accord.Statistics
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public static double Distance(
	this IKernel kernel,
	double[] x,
	double[] y
)
Request Example View Source

Parameters

kernel
Type: Accord.Statistics.KernelsIKernel
The kernel function whose distance needs to be evaluated.
x
Type: SystemDouble
An input point x given in input space.
y
Type: SystemDouble
An input point y given in input space.

Return Value

Type: Double
The distance between x and y in kernel (feature) space.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IKernel. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also