Package opennlp.tools.ml.naivebayes
Klasse NaiveBayesTrainer
java.lang.Object
opennlp.tools.ml.AbstractTrainer
opennlp.tools.ml.AbstractEventTrainer
opennlp.tools.ml.naivebayes.NaiveBayesTrainer
- Alle implementierten Schnittstellen:
Trainer
,EventTrainer
Trains
models
using the combination of EM algorithm
and Naive Bayes classifier which is described in:
Text Classification from Labeled and Unlabeled Documents using EM Nigam, McCallum, et al. paper of 2000
- Siehe auch:
-
Feldübersicht
FelderVon Klasse geerbte Felder opennlp.tools.ml.AbstractEventTrainer
DATA_INDEXER_ONE_PASS_REAL_VALUE, DATA_INDEXER_ONE_PASS_VALUE, DATA_INDEXER_PARAM, DATA_INDEXER_TWO_PASS_VALUE
Von Schnittstelle geerbte Felder opennlp.tools.ml.EventTrainer
EVENT_VALUE
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungInstantiates aNaiveBayesTrainer
with default training parameters.NaiveBayesTrainer
(TrainingParameters parameters) Instantiates aNaiveBayesTrainer
with specificTrainingParameters
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdoTrain
(DataIndexer indexer) boolean
Trains aNaiveBayesModel
with given parameters.Von Klasse geerbte Methoden opennlp.tools.ml.AbstractEventTrainer
getDataIndexer, train, train, validate
Von Klasse geerbte Methoden opennlp.tools.ml.AbstractTrainer
getAlgorithm, getCutoff, getIterations, init
-
Felddetails
-
NAIVE_BAYES_VALUE
- Siehe auch:
-
-
Konstruktordetails
-
NaiveBayesTrainer
public NaiveBayesTrainer()Instantiates aNaiveBayesTrainer
with default training parameters. -
NaiveBayesTrainer
Instantiates aNaiveBayesTrainer
with specificTrainingParameters
.- Parameter:
parameters
- Theparameter
to use.
-
-
Methodendetails
-
isSortAndMerge
public boolean isSortAndMerge()- Angegeben von:
isSortAndMerge
in KlasseAbstractEventTrainer
-
doTrain
- Angegeben von:
doTrain
in KlasseAbstractEventTrainer
- Löst aus:
IOException
-
trainModel
Trains aNaiveBayesModel
with given parameters.- Parameter:
di
- TheDataIndexer
used as data input.- Gibt zurück:
- A valid, trained
Naive Bayes model
.
-