Package opennlp.tools.ml.perceptron
Klasse PerceptronModel
java.lang.Object
opennlp.tools.ml.model.AbstractModel
opennlp.tools.ml.perceptron.PerceptronModel
- Alle implementierten Schnittstellen:
MaxentModel
A
model
implementation based one the perceptron algorithm.
Each outcome is represented as a binary perceptron classifier. This supports standard (integer) weighting as well average weighting as described in: Discriminative Training Methods for Hidden Markov Models: Theory and Experiments with the Perceptron Algorithm. Michael Collins, EMNLP 2002.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen opennlp.tools.ml.model.AbstractModel
AbstractModel.ModelType
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungPerceptronModel
(Context[] params, String[] predLabels, String[] outcomeNames) Initializes aPerceptronModel
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
static double[]
eval
(int[] context, double[] prior, EvalParameters model) Evaluates aPerceptronModel
.double[]
Evaluates acontext
.double[]
Evaluates acontext
.double[]
Evaluates acontext
with the specified contextvalues
.double[]
int
hashCode()
Von Klasse geerbte Methoden opennlp.tools.ml.model.AbstractModel
getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getNumOutcomes, getOutcome
-
Konstruktordetails
-
PerceptronModel
Initializes aPerceptronModel
.- Parameter:
params
- Theparameters
to 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 acontext
with 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 aPerceptronModel
.- Parameter:
context
- The context parameters asint[]
.prior
- The data prior to the evaluation asdouble[]
.model
- TheEvalParameters
used for evaluation.- Gibt zurück:
- The resulting evaluation data as
double[]
.
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCode
in KlasseAbstractModel
-
equals
- Setzt außer Kraft:
equals
in KlasseAbstractModel
-