ml-kernel
v3.0.0
Published
A factory for kernel functions
Downloads
76,665
Readme
ml-kernel
A factory for kernel functions.
Installation
$ npm i ml-kernel
Usage
new Kernel(type, options)
This function can be called with a matrix of input vectors. and optional landmarks. If no landmark is provided, the input vectors will be used.
Available kernels:
linear
- Linear kernelgaussian
orrbf
- Gaussian (radial basis function) kernelpolynomial
orpoly
- Polynomial kernelexponential
- Exponential kernellaplacian
- Laplacian kernelanova
- ANOVA kernelrational
- Rational Quadratic kernelmultiquadratic
- Multiquadratic kernelcauchy
- Cauchy kernelhistogram
ormin
- Histogram Intersection kernelsigmoid
or `mlp' - Sigmoid (hyperbolic tangent) kernel
kernel.compute(inputs, landmarks)
This function can be called with a matrix of input vectors and optional landmarks.
If no landmark is provided, the input vectors will be used.
The function returns a kernel matrix of feature space vectors.