GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mljs/kernel: A factory for kernel functions

BranchesTags
Open more actions menu

Latest commit

 

History

66 Commits
66 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
.prettierignore
.prettierignore
 
 
.prettierrc.json
.prettierrc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.js
eslint.config.js
 
 
package.json
package.json
 
 
vitest.config.js
vitest.config.js
 
 

Repository files navigation

ml-kernel

NPM version build status npm 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:

  • linear - Linear kernel
  • gaussian or rbf - Gaussian (radial basis function) kernel
  • polynomial or poly - Polynomial kernel
  • exponential - Exponential kernel
  • laplacian - Laplacian kernel
  • anova - ANOVA kernel
  • rational - Rational Quadratic kernel
  • multiquadratic - Multiquadratic kernel
  • cauchy - Cauchy kernel
  • histogram or min - Histogram Intersection kernel
  • sigmoid 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.

Example

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 instance

License

MIT

About

A factory for kernel functions

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.