HyperTan

HyperTan

Hyperbolic tangent kernel: k(x,y) = tanh(α·xᵀy + c). Parameters: [alpha, c] (defaults alpha = 1, c = 0). nbParameters = 2. Not scalable.

Constructor

new HyperTan(alphaopt, copt)

Source:
Parameters:
Name Type Attributes Default Description
alpha number <optional>
1
c number <optional>
0

Classes

HyperTan

Members

alpha :number

Description:
  • scaling of the inner product

Source:

scaling of the inner product

Type:
  • number

c :number

Description:
  • constant added to the inner product

Source:

constant added to the inner product

Type:
  • number

Methods

gradient(x1, x2) → {Array.<number>}

Description:
  • gradient = [grad_alpha, grad_c] with x = x1·x2: grad_c = 1 / cosh(α·x + c)² grad_alpha = x · grad_c

Source:
Parameters:
Name Type Description
x1 Array.<number>
x2 Array.<number>
Returns:
Type
Array.<number>

kernel(x1, x2) → {number}

Source:
Parameters:
Name Type Description
x1 Array.<number>
x2 Array.<number>
Returns:
Type
number

setParameters(parameters)

Source:
Parameters:
Name Type Description
parameters Array.<number>