Skip to content

Repository files navigation

ml-kernel

NPM versionbuild statusnpm download

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:

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.

Example

import{Kernel}from'ml-kernel';constkernel=newKernel('gaussian',{sigma: 1});constresult=kernel.compute([[1,2],[3,4],]);// result is an ml-matrix Matrix instance

License

MIT

About

A factory for kernel functions

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages