public class AdaBoostM1 extends Object implements Classifier, Parameterized
OneVSAll
to obtain better classification accuracy.Modifier and Type | Field and Description |
---|---|
protected List<Classifier> |
hypoths
The list of weak hypothesis
|
protected List<Double> |
hypWeights
The weights for each weak learner
|
protected CategoricalData |
predicting |
Constructor and Description |
---|
AdaBoostM1(Classifier weakLearner,
int maxIterations) |
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
AdaBoostM1 |
clone() |
int |
getMaxIterations()
Returns the maximum number of iterations used
|
List<Classifier> |
getModels() |
List<Double> |
getModelWeights() |
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 currently being used by this method.
|
void |
setMaxIterations(int maxIterations)
Sets the maximal number of boosting iterations that may be performed
|
void |
setWeakLearner(Classifier weakLearner)
Sets the weak learner used during training.
|
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.
|
protected List<Classifier> hypoths
protected CategoricalData predicting
public AdaBoostM1(Classifier weakLearner, int maxIterations)
public int getMaxIterations()
public List<Classifier> getModels()
public List<Double> getModelWeights()
public void setMaxIterations(int maxIterations)
maxIterations
- the maximum number of iterationspublic Classifier getWeakLearner()
public void setWeakLearner(Classifier weakLearner)
weakLearner
- the weak learner to usepublic 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 AdaBoostM1 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.