jsat.classifiers.boosting
Class SAMME
- java.lang.Object
-
- jsat.classifiers.boosting.SAMME
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized
public class SAMME extends java.lang.Object implements Classifier, Parameterized
This is an implementation of the Multi-Class AdaBoost method SAMME (Stagewise Additive Modeling using a Multi-Class Exponential loss function), presented in Multi-class AdaBoost by Ji Zhu, Saharon Rosset, Hui Zou,&Trevor Hasstie
This algorithm reduces toAdaBoostM1for binary classification problems. Its often performs better for k class classification problems, and has a weaker requirement of besting 1/k accuracy for any k instead of 1/2.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SAMME(Classifier weakLearner, int maxIterations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CategoricalResultsclassify(DataPoint data)Performs classification on the given data point.SAMMEclone()java.util.List<Classifier>getModels()java.util.List<java.lang.Double>getModelWeights()booleansupportsWeightedData()Indicates whether the model knows how to train using weighted data points.voidtrain(ClassificationDataSet dataSet, boolean parallel)Trains the classifier and constructs a model for classification using the given data set.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.classifiers.Classifier
train
-
Methods inherited from interface jsat.parameters.Parameterized
getParameter, getParameters
-
-
-
-
Constructor Detail
-
SAMME
public SAMME(Classifier weakLearner, int maxIterations)
-
-
Method Detail
-
classify
public CategoricalResults classify(DataPoint data)
Description copied from interface:ClassifierPerforms classification on the given data point.- Specified by:
classifyin interfaceClassifier- Parameters:
data- the data point to classify- Returns:
- the results of the classification.
-
getModels
public java.util.List<Classifier> getModels()
- Returns:
- a list of the models that are in this ensemble.
-
getModelWeights
public java.util.List<java.lang.Double> getModelWeights()
- Returns:
- a list of the models weights that are in this ensemble.
-
train
public void train(ClassificationDataSet dataSet, boolean parallel)
Description copied from interface:ClassifierTrains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.- Specified by:
trainin interfaceClassifier- Parameters:
dataSet- the data set to train onparallel-trueif multiple threads should be used to train the model.falseif it should be done in a single threaded manner.
-
supportsWeightedData
public boolean supportsWeightedData()
Description copied from interface:ClassifierIndicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.- Specified by:
supportsWeightedDatain interfaceClassifier- Returns:
- true if the model supports weighted data, false otherwise
-
clone
public SAMME clone()
- Specified by:
clonein interfaceClassifier- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG