public abstract class BaseUpdateableClassifier extends Object implements UpdateableClassifier
trainC(jsat.classifiers.ClassificationDataSet,
java.util.concurrent.ExecutorService)
will simply call
trainC(jsat.classifiers.ClassificationDataSet)
, which will call
UpdateableClassifier.setUp(jsat.classifiers.CategoricalData[], int,
jsat.classifiers.CategoricalData)
and then call
UpdateableClassifier.update(jsat.classifiers.DataPoint, int)
for each data point in a
random order.Constructor and Description |
---|
BaseUpdateableClassifier()
Default constructor that does nothing
|
BaseUpdateableClassifier(BaseUpdateableClassifier toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
abstract UpdateableClassifier |
clone() |
int |
getEpochs()
Returns the number of epochs used for training
|
void |
setEpochs(int epochs)
Sets the number of whole iterations through the training set that will be
performed for training
|
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.
|
static void |
trainEpochs(ClassificationDataSet dataSet,
UpdateableClassifier toTrain,
int epochs)
Performs training on an updateable classifier by going over the whole
data set in random order one observation at a time, multiple times.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setUp, update
classify, supportsWeightedData
public BaseUpdateableClassifier()
public BaseUpdateableClassifier(BaseUpdateableClassifier toCopy)
toCopy
- object to copypublic void setEpochs(int epochs)
epochs
- the number of whole iterations through the data setpublic int getEpochs()
public 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 static void trainEpochs(ClassificationDataSet dataSet, UpdateableClassifier toTrain, int epochs)
dataSet
- the data set to train fromtoTrain
- the classifier to trainepochs
- the number of passes through the data setpublic abstract UpdateableClassifier clone()
clone
in interface Classifier
clone
in interface UpdateableClassifier
clone
in class Object
Copyright © 2017. All rights reserved.