public class SigmoidKernel extends BaseKernelTrick
Constructor and Description |
---|
SigmoidKernel(double alpha)
Creates a new Sigmoid Kernel with a bias term of 1
|
SigmoidKernel(double alpha,
double C)
Creates a new Sigmoid Kernel
|
Modifier and Type | Method and Description |
---|---|
SigmoidKernel |
clone() |
double |
eval(Vec a,
Vec b)
Evaluate this kernel function for the two given vectors.
|
double |
getAlpha()
Returns the scaling parameter
|
double |
getC()
Returns the additive constant
|
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.
|
static Distribution |
guessAlpha(DataSet d)
Guesses a distribution for the α parameter
|
static Distribution |
guessC(DataSet d)
Guesses a distribution for the α parameter
|
void |
setAlpha(double alpha)
Sets the scaling factor for the dot product, this is equivalent to
multiplying each value in the data set by a constant factor
|
void |
setC(double c)
Sets the additive term, when set to one this is equivalent to adding a
bias term of 1 to each vector.
|
addToCache, eval, eval, evalSum, evalSum, getAccelerationCache, getQueryInfo, normalized, supportsAcceleration
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public SigmoidKernel(double alpha, double C)
alpha
- the scaling factor for the dot productC
- the additive constantpublic SigmoidKernel(double alpha)
alpha
- the scaling factor for the dot productpublic void setAlpha(double alpha)
alpha
- the scaling factorpublic double getAlpha()
public void setC(double c)
alpha
.c
- the non negative additive termpublic double getC()
public double eval(Vec a, Vec b)
KernelTrick
a
- the first vectorb
- the first vectorpublic static Distribution guessAlpha(DataSet d)
d
- the data to get the guess forpublic static Distribution guessC(DataSet d)
d
- the data to get the guess forpublic List<Parameter> getParameters()
Parameterized
public Parameter getParameter(String paramName)
Parameterized
paramName
- the name of the parameter to obtainpublic SigmoidKernel clone()
clone
in interface KernelTrick
clone
in class BaseKernelTrick
Copyright © 2017. All rights reserved.