public abstract class Kernel extends Object implements Cloneable
Modifier | Constructor and Description |
---|---|
protected |
Kernel(int numberOfParameters)
Creates a
Kernel and specifies the number of kernel
parameters for a specific Kernel. |
Modifier and Type | Method and Description |
---|---|
Kernel |
clone()
Returns a clone of this object.
|
protected double |
dot(DataNode[] x,
DataNode[] y)
Calculates the dot product between two
DataNode arrays. |
double[] |
getParameters()
Returns the kernel parameters.
|
abstract double |
kernelFunction(DataNode[][] x,
int i,
int j)
Abstract method to calculate the kernel function between two
DataNode arrays. |
abstract double |
kernelFunction(DataNode[] x,
DataNode[] y)
Abstract method to calculate the kernel function between two
DataNode arrays. |
void |
setParameters(double[] kParams)
Sets the kernel parameters.
|
protected Kernel(int numberOfParameters)
Kernel
and specifies the number of kernel
parameters for a specific Kernel.numberOfParameters
- an int
indicating the number of
parameters this Kernel
must havepublic Kernel clone() throws CloneNotSupportedException
clone
in class Object
Kernel
which is a clone of this objectCloneNotSupportedException
- Thrown to indicate that the
clone
method in class Object
has been called
to clone an object, but that the object's class does not implement the
Cloneable
interface.protected double dot(DataNode[] x, DataNode[] y)
DataNode
arrays. The
array lengths may be different.x
- a DataNode
arrayy
- a DataNode
arraydouble
, the dot product between x
and
y
public double[] getParameters()
double
array containing the kernel parameterspublic abstract double kernelFunction(DataNode[][] x, int i, int j)
DataNode
arrays.x
- a DataNode
matrixi
- an int
, the index of the first
DataNode
, x[i]
j
- an int
, the index of the second
DataNode
, x[j]
double
, the kernel function evaluated at
x[i]
and x[j]
public abstract double kernelFunction(DataNode[] x, DataNode[] y)
DataNode
arrays.x
- a DataNode
arrayy
- a DataNode
arraydouble
, the kernel function evaluated at
x
and y
public void setParameters(double[] kParams)
Specific instances can override this method to test for proper values of the parameters.
kParams
- a double
array containing the parametersCopyright © 1970-2016 Rogue Wave Software
Built May 19 2016.