|
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>
<ExtensionAttribute>
Public Shared Function ToMatrix2(Of TKernel As {Object, IKernel(Of TInput)}, TInput) (
kernel As TKernel,
x As TInput(),
y As TInput(),
Optional result As Double(,) = Nothing
) As Double(,)
Request Example
View SourceParameters
- 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:
DoubleA 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