com.datumbox.framework.core.machinelearning.classification
Class BernoulliNaiveBayes
- java.lang.Object
-
- com.datumbox.framework.core.machinelearning.common.abstracts.AbstractTrainer<MP,TP>
-
- com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractModeler<MP,TP>
-
- com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractClassifier<MP,TP>
-
- com.datumbox.framework.core.machinelearning.common.abstracts.algorithms.AbstractNaiveBayes<BernoulliNaiveBayes.ModelParameters,BernoulliNaiveBayes.TrainingParameters>
-
- com.datumbox.framework.core.machinelearning.classification.BernoulliNaiveBayes
-
- All Implemented Interfaces:
- Savable, Parallelizable, PredictParallelizable, Trainable<BernoulliNaiveBayes.ModelParameters,BernoulliNaiveBayes.TrainingParameters>, TrainParallelizable, java.lang.AutoCloseable
public class BernoulliNaiveBayes extends AbstractNaiveBayes<BernoulliNaiveBayes.ModelParameters,BernoulliNaiveBayes.TrainingParameters>
The BernoulliNaiveBayes class implements the Bernoulli Naive Bayes model. References: http://blog.datumbox.com/machine-learning-tutorial-the-naive-bayes-text-classifier/ http://nlp.stanford.edu/IR-book/html/htmledition/the-bernoulli-model-1.html
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classBernoulliNaiveBayes.ModelParametersBase class for every ModelParameter class in the framework.static classBernoulliNaiveBayes.TrainingParametersThe AbstractTrainingParameters class stores the parameters that can be changed before training the algorithm.-
Nested classes/interfaces inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.algorithms.AbstractNaiveBayes
AbstractNaiveBayes.AbstractModelParameters, AbstractNaiveBayes.AbstractTrainingParameters
-
Nested classes/interfaces inherited from interface com.datumbox.framework.core.machinelearning.common.interfaces.PredictParallelizable
PredictParallelizable.Prediction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PredictParallelizable.Prediction_predictRecord(Record r)Takes a single record, makes a prediction using the model and returns the result wrapped in the Prediction tuple.-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.algorithms.AbstractNaiveBayes
isParallelized, setParallelized
-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.modelers.AbstractModeler
predict
-
Methods inherited from class com.datumbox.framework.core.machinelearning.common.abstracts.AbstractTrainer
close, delete, fit, getModelParameters, getTrainingParameters, save
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.datumbox.framework.core.machinelearning.common.interfaces.PredictParallelizable
_predictDatasetParallel, _predictDatasetParallel
-
-
-
-
Method Detail
-
_predictRecord
public PredictParallelizable.Prediction _predictRecord(Record r)
Takes a single record, makes a prediction using the model and returns the result wrapped in the Prediction tuple. The method assumes that the KnowledgeBase is be loaded.- Specified by:
_predictRecordin interfacePredictParallelizable- Overrides:
_predictRecordin classAbstractNaiveBayes<BernoulliNaiveBayes.ModelParameters,BernoulliNaiveBayes.TrainingParameters>- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG