public class NaiveBayesUpdateable extends BaseUpdateableClassifier
NaiveBayes
is not
possible in online form.Modifier | Constructor and Description |
---|---|
|
NaiveBayesUpdateable()
Creates a new Naive Bayes classifier that assumes sparce input vectors
|
|
NaiveBayesUpdateable(boolean sparse)
Creates a new Naive Bayes classifier
|
protected |
NaiveBayesUpdateable(NaiveBayesUpdateable other)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
NaiveBayesUpdateable |
clone() |
boolean |
isSparseInput()
Returns true if the input is assume sparse
|
void |
setSparse(boolean sparseInput)
Sets whether or not that classifier should behave as if the input vectors
are sparse.
|
void |
setUp(CategoricalData[] categoricalAttributes,
int numericAttributes,
CategoricalData predicting)
Prepares the classifier to begin learning from its
UpdateableClassifier.update(jsat.classifiers.DataPoint, int) method. |
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
void |
update(DataPoint dataPoint,
int targetClass)
Updates the classifier by giving it a new data point to learn from.
|
getEpochs, setEpochs, trainC, trainC, trainEpochs
public NaiveBayesUpdateable()
public NaiveBayesUpdateable(boolean sparse)
sparse
- whether or not to assume input vectors are sparceprotected NaiveBayesUpdateable(NaiveBayesUpdateable other)
other
- the classifier to make a copy ofpublic NaiveBayesUpdateable clone()
clone
in interface Classifier
clone
in interface UpdateableClassifier
clone
in class BaseUpdateableClassifier
public void setUp(CategoricalData[] categoricalAttributes, int numericAttributes, CategoricalData predicting)
UpdateableClassifier
UpdateableClassifier.update(jsat.classifiers.DataPoint, int)
method.categoricalAttributes
- an array containing the categorical
attributes that will be in each data pointnumericAttributes
- the number of numeric attributes that will be in
each data pointpredicting
- the information for the target class that will be
predictedpublic void update(DataPoint dataPoint, int targetClass)
UpdateableClassifier
dataPoint
- the data point to learntargetClass
- the target class of the data pointpublic CategoricalResults classify(DataPoint data)
Classifier
data
- the data point to classifypublic boolean supportsWeightedData()
Classifier
public boolean isSparseInput()
public void setSparse(boolean sparseInput)
sparseInput
- true to use a sparse modelCopyright © 2017. All rights reserved.