public class RadialBasisKernel extends Kernel
The kernel function at two data nodes, \(x_i\) and \(x_j\), is given by \(K(x_i , x_j) = \exp (-\gamma { \parallel x_i-x_j \parallel }^2)\), where \(\gamma \gt 0 \) is a configurable parameter.
Constructor and Description |
---|
RadialBasisKernel()
Constructs a radial basis kernel with a \(\gamma\) value
of 1.0.
|
RadialBasisKernel(double gamma)
Constructs a radial basis kernel.
|
RadialBasisKernel(RadialBasisKernel radialBasisKernel)
Constructs a copy of the input
RadialBasisKernel kernel. |
Modifier and Type | Method and Description |
---|---|
RadialBasisKernel |
clone()
Clones a
RadialBasisKernel kernel. |
double |
kernelFunction(DataNode[][] x,
int i,
int j)
Calculates the kernel function between two
DataNode s. |
double |
kernelFunction(DataNode[] x,
DataNode[] y)
Calculates the kernel function between two
DataNode s. |
void |
setParameters(double... kParams)
Sets the parameters for the radial basis kernel.
|
dot, getParameters
public RadialBasisKernel()
public RadialBasisKernel(double gamma)
gamma
- a double
, the radial basis kernel free
parameterpublic RadialBasisKernel(RadialBasisKernel radialBasisKernel)
RadialBasisKernel
kernel.radialBasisKernel
- a RadialBasisKernel
kernelpublic RadialBasisKernel clone()
RadialBasisKernel
kernel.public void setParameters(double... kParams)
setParameters
in class Kernel
kParams
- a double
array of length 1 containing the
parameter value: kParams[0]
=\(\gamma\)
Default: kParams[0]
=\(\gamma\)=1.0
public double kernelFunction(DataNode[] x, DataNode[] y)
DataNode
s.kernelFunction
in class Kernel
x
- a DataNode
arrayy
- a DataNode
arraydouble
, the kernel function evaluated at
x
and y
public double kernelFunction(DataNode[][] x, int i, int j)
DataNode
s.kernelFunction
in class Kernel
x
- a DataNode
matrixi
- an int
, index to the first DataNode
,
x[i]
j
- an int
, index to the second DataNode
,
x[j]
double
, the kernel function evaluated at
x[i]
and x[j]
Copyright © 2020 Rogue Wave Software. All rights reserved.