Home Reference Source
import PolynomialKernel from '@jsmlt/jsmlt/src/kernel/polynomial.js'
public class | source

PolynomialKernel

Extends:

Kernel → PolynomialKernel

The Polynomial kernel. The formula of this kernel is as follows: (gamma * <x, y> + coef0)^degree

Constructor Summary

Public Constructor
public

constructor(options: Object)

Initialize the Polynomial kernel with user-specified parameters

Member Summary

Public Members
public

Bias coefficient (not part of the dot product)

public

Degree of the polynomial

public

Normalization parameter of basic dot product

Method Summary

Public Methods
public

apply(x: *, y: *): *

Inherited Summary

From class Kernel
public

Evaluate the kernel on a pair of data points

Public Constructors

public constructor(options: Object) source

Initialize the Polynomial kernel with user-specified parameters

Params:

NameTypeAttributeDescription
options Object
  • optional

User-defined options

options.gamma number
  • optional
  • default: 1

Normalization parameter of basic dot product

options.coef0 number
  • optional
  • default: 1

Bias coefficient (not part of the dot product)

options.degree number
  • optional
  • default: 2

Degree of the polynomial

Public Members

public coef0: number source

Bias coefficient (not part of the dot product)

public degree: number source

Degree of the polynomial

public gamma: number source

Normalization parameter of basic dot product

Public Methods

public apply(x: *, y: *): * source

Evaluate the kernel on a pair of data points

Override:

Kernel#apply

Params:

NameTypeAttributeDescription
x *
y *

Return:

*

See: