public class SBP extends SupportVectorLearner implements BinaryScoreClassifier, Parameterized
SupportVectorLearner.CacheMode
accelCache, alphas, cacheEvictions, evalCount, vecs
Modifier | Constructor and Description |
---|---|
|
SBP(KernelTrick kernel,
SupportVectorLearner.CacheMode cacheMode,
int iterations,
double v)
Creates a new SBP SVM learner
|
protected |
SBP(SBP other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
SBP |
clone() |
double |
getBurnIn() |
int |
getIterations()
Returns the number of iterations the algorithm will perform
|
double |
getNu()
Returns the nu SVM parameter
|
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.
|
double |
getScore(DataPoint dp)
Returns the numeric score for predicting a class of a given data point,
where the sign of the value indicates which class the data point is
predicted to belong to.
|
void |
setBurnIn(double burnIn)
Sets the burn in fraction.
|
void |
setIterations(int iterations)
Sets the number of iterations to go through.
|
void |
setNu(double nu)
The nu parameter for this SVM is not the same as the standard nu-SVM
formulation, though it plays a similar role.
|
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
void |
trainC(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the
given data set.
|
void |
trainC(ClassificationDataSet dataSet,
ExecutorService threadPool)
Trains the classifier and constructs a model for classification using the
given data set.
|
accessingRow, getCacheMode, getCacheValue, getKernel, k, kEval, kEval, kEvalSum, setAlphas, setCacheMode, setCacheSize, setCacheValue, setKernel, sparsify
public SBP(KernelTrick kernel, SupportVectorLearner.CacheMode cacheMode, int iterations, double v)
kernel
- the kernel to usecacheMode
- the type of kernel cache to useprotected SBP(SBP other)
other
- the object to copypublic SBP clone()
clone
in interface BinaryScoreClassifier
clone
in interface Classifier
clone
in class Object
public void setIterations(int iterations)
iterations
- the number of iterations of the algorithm to performpublic int getIterations()
public void setNu(double nu)
nu
- the value between (0, 1)public double getNu()
public void setBurnIn(double burnIn)
burnIn
- the ratio int [0, 1) initial solutions to ignorepublic double getBurnIn()
public CategoricalResults classify(DataPoint data)
Classifier
classify
in interface Classifier
data
- the data point to classifypublic double getScore(DataPoint dp)
BinaryScoreClassifier
getScore
in interface BinaryScoreClassifier
dp
- the data point to predict the class label ofpublic void trainC(ClassificationDataSet dataSet, ExecutorService threadPool)
Classifier
trainC
in interface Classifier
dataSet
- the data set to train onthreadPool
- the source of threads to use.public void trainC(ClassificationDataSet dataSet)
Classifier
trainC
in interface Classifier
dataSet
- the data set to train onpublic boolean supportsWeightedData()
Classifier
supportsWeightedData
in interface Classifier
public List<Parameter> getParameters()
Parameterized
getParameters
in interface Parameterized
public Parameter getParameter(String paramName)
Parameterized
getParameter
in interface Parameterized
paramName
- the name of the parameter to obtainCopyright © 2017. All rights reserved.