package
A factory for kernel functions
npm install ml-kernelGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
A factory for kernel functions.
$ npm i ml-kernel
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 or rbf - Gaussian (radial basis function) kernelpolynomial or poly - Polynomial kernelexponential - Exponential kernellaplacian - Laplacian kernelThis 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.
import { Kernel } from 'ml-kernel';
const kernel = new Kernel('gaussian', { sigma: 1 });
const result = kernel.compute([
[1, 2],
[3, 4],
]);
// result is an ml-matrix Matrix instancetargos
npm@secmail.targos.dev
anovarational - Rational Quadratic kernelmultiquadratic - Multiquadratic kernelcauchy - Cauchy kernelhistogram or min - Histogram Intersection kernelsigmoid or mlp - Sigmoid (hyperbolic tangent) kernelEstimated unpacked size across 10 packages.
1.1 MB
Includes dependencies.
5 direct dependencies.
^6.12.2
6.15.1
^2.0.0
2.0.0
^3.0.0
3.0.0
^3.0.0
3.0.0
^3.0.1
3.0.1