Click or drag to resize
Accord.NET (logo)

KernelToMatrix2TKernel, TInput Method

Creates the Gram matrix containing all dot products in feature (kernel) space between each vector in x and the ones in y.

Namespace:  Accord.Statistics.Kernels
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public static double[,] ToMatrix2<TKernel, TInput>(
	this TKernel kernel,
	TInput[] x,
	TInput[] y,
	double[,] result = null
)
where TKernel : Object, IKernel<TInput>
Request Example View Source

Parameters

kernel
Type: TKernel
The kernel function.
x
Type: TInput
The first vectors.
y
Type: TInput
The second vectors.
result (Optional)
Type: SystemDouble
An optional matrix where the result should be stored in.

Type Parameters

TKernel
TInput

Return Value

Type: Double
A symmetric matrix containing the dot-products in feature (kernel) space between each vector in x and the ones in y.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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