Package opennlp.tools.ml.naivebayes
Klasse NaiveBayesModel
java.lang.Object
opennlp.tools.ml.model.AbstractModel
opennlp.tools.ml.naivebayes.NaiveBayesModel
- Alle implementierten Schnittstellen:
MaxentModel
A
MaxentModel implementation of the multinomial Naive Bayes classifier model.- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen opennlp.tools.ml.model.AbstractModel
AbstractModel.ModelType -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungNaiveBayesModel(Context[] params, String[] predLabels, String[] outcomeNames) Initializes aNaiveBayesModel. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic double[]eval(int[] context, double[] prior, EvalParameters model) Evaluates aNaiveBayesModel.double[]Evaluates acontext.double[]Evaluates acontext.double[]Evaluates acontextwith the specified contextvalues.double[]Von Klasse geerbte Methoden opennlp.tools.ml.model.AbstractModel
equals, getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getNumOutcomes, getOutcome, hashCode
-
Konstruktordetails
-
NaiveBayesModel
Initializes aNaiveBayesModel.- Parameter:
params- Theparametersto set.predLabels- The predicted labels.outcomeNames- The names of the outcomes.
-
-
Methodendetails
-
eval
Evaluates acontext.- Parameter:
context- An array of String names of the contextual predicates which are to be evaluated together.- Gibt zurück:
- An array of the probabilities for each of the different
outcomes, all of which sum to
1.
-
eval
Evaluates acontextwith the specified contextvalues.- Parameter:
context- An array of String names of the contextual predicates which are to be evaluated together.values- The values associated with each context.- Gibt zurück:
- An array of the probabilities for each of the different
outcomes, all of which sum to
1.
-
eval
Evaluates acontext.- Parameter:
context- An array of String names of the contextual predicates which are to be evaluated together.probs- An array which is populated with the probabilities for each of the different outcomes, all of which sum to 1.- Gibt zurück:
- An array of the probabilities for each of the different
outcomes, all of which sum to
1.
-
eval
-
eval
Evaluates aNaiveBayesModel.- Parameter:
context- The context parameters asint[].prior- The data prior to the evaluation asdouble[].model- TheEvalParametersused for evaluation.- Gibt zurück:
- The resulting evaluation data as
double[].
-