Interface IKernel
In machine learning there is something called the Kernel Trick. In essence it allows for the mapping of observations in any general space into an inner product space (or Reproducing Kernel Hilbert Space). This trick thereby creates (or one hopes) linear separability in the augmented inner product space where simple linear classifiers perform extremely well.
Namespace:numl.Math.Kernels
Assembly:numl.dll
Syntax
public interface IKernel
Properties
View SourceIsLinear
Returns a boolean indicating whether this is a linear kernel.
Declaration
bool IsLinear { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
View SourceCompute(Matrix)
Computes the Kernel Matrix using the given input.
Declaration
Matrix Compute(Matrix m)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix | m | Input Matrix. |
Returns
| Type | Description |
|---|---|
| Matrix | Kernel Matrix. |
Compute(Vector, Vector)
Computes the kernel function between the two input vectors.
Declaration
double Compute(Vector v1, Vector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | v1 | Vector one. |
| Vector | v2 | Vector two. |
Returns
| Type | Description |
|---|---|
| System.Double | Similarity. |
Project(Matrix, Vector)
Projects the vector x into the corresponding inner product space.
Declaration
Vector Project(Matrix m, Vector x)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix | m | Kernel Matrix. |
| Vector | x | Vector in original space. |
Returns
| Type | Description |
|---|---|
| Vector | Vector in inner product space. |