public class LinearKernel extends BaseKernelTrick
Constructor and Description |
---|
LinearKernel()
Creates a new Linear Kernel with an added bias term of 1
|
LinearKernel(double c)
Creates a new Linear Kernel that computes the dot product and offsets it by a specified value
|
Modifier and Type | Method and Description |
---|---|
LinearKernel |
clone() |
double |
eval(Vec a,
Vec b)
Evaluate this kernel function for the two given vectors.
|
double |
getC()
Returns the positive additive term
|
Parameter |
getParameter(String paramName)
Returns the parameter with the given name.
|
List<Parameter> |
getParameters()
Returns the list of parameters that can be altered for this learner.
|
void |
setC(double c)
The positive bias term added to the result of the dot product
|
String |
toString()
A descriptive name for the type of KernelFunction
|
addToCache, eval, eval, evalSum, evalSum, getAccelerationCache, getQueryInfo, normalized, supportsAcceleration
public LinearKernel(double c)
c
- the positive bias term for the dot productpublic LinearKernel()
public void setC(double c)
c
- the added product termpublic double getC()
public double eval(Vec a, Vec b)
KernelTrick
a
- the first vectorb
- the first vectorpublic String toString()
KernelTrick
toString
in interface KernelTrick
toString
in class Object
public List<Parameter> getParameters()
Parameterized
public Parameter getParameter(String paramName)
Parameterized
paramName
- the name of the parameter to obtainpublic LinearKernel clone()
clone
in interface KernelTrick
clone
in class BaseKernelTrick
Copyright © 2017. All rights reserved.