public class ArcX4 extends Object implements Classifier, Parameterized
Constructor and Description |
---|
ArcX4(Classifier weakLearner,
int iterations)
Creates a new Arc-X4 classifier
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
ArcX4 |
clone() |
double |
getCoefficient()
Returns the coefficient use when re-weighting
|
double |
getExponent()
Returns the exponent used when re-weighting
|
int |
getIterations()
Returns the number of iterations to learn
|
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.
|
Classifier |
getWeakLearner()
Returns the weak learner used
|
void |
setCoefficient(double coef)
Weights are updated as 1+coef*errorsexpo.
|
void |
setExponent(double expo)
Weights are updated as 1+coef*errorsexpo.
|
void |
setIterations(int iterations)
Sets the number of iterations to perform
|
void |
setWeakLearner(Classifier weakLearner)
Sets the weak learner used at each iteration of learning
|
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.
|
public ArcX4(Classifier weakLearner, int iterations)
weakLearner
- the weak learner to useiterations
- the number of iterations to performpublic void setWeakLearner(Classifier weakLearner)
weakLearner
- the weak learner to usepublic Classifier getWeakLearner()
public void setIterations(int iterations)
iterations
- the number of iterations to dopublic int getIterations()
public void setCoefficient(double coef)
coef
- the multiplicative factor on the errors in weight constructionpublic double getCoefficient()
public void setExponent(double expo)
expo
- the exponent to usepublic double getExponent()
public CategoricalResults classify(DataPoint data)
Classifier
classify
in interface Classifier
data
- the data point to classifypublic 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 ArcX4 clone()
clone
in interface Classifier
clone
in class Object
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.