Catalano.Statistics.Kernels
Class Linear
- java.lang.Object
-
- Catalano.Statistics.Kernels.Linear
-
- All Implemented Interfaces:
- IMercerKernel<double[]>, java.io.Serializable
public class Linear extends java.lang.Object implements IMercerKernel<double[]>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Linear()Constructs a new Linear Kernel.Linear(double constant)Constructs a new Linear kernel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleFunction(double[] x, double[] y)Linear kernel function.doublegetConstant()Gets the kernel's intercept term.voidsetConstant(double value)Sets the kernel's intercept term.
-
-
-
Constructor Detail
-
Linear
public Linear(double constant)
Constructs a new Linear kernel.- Parameters:
constant- A constant intercept term. Default is 1.
-
Linear
public Linear()
Constructs a new Linear Kernel.
-
-
Method Detail
-
getConstant
public double getConstant()
Gets the kernel's intercept term.- Returns:
- Kernel's intercept term.
-
setConstant
public void setConstant(double value)
Sets the kernel's intercept term.- Parameters:
value- Kernel's intercept term.
-
Function
public double Function(double[] x, double[] y)Linear kernel function.- Specified by:
Functionin interfaceIMercerKernel<double[]>- Parameters:
x- Vectorx in input space.y- Vectory in input space.- Returns:
- Dot product in feature (kernel) space.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG