Class QNModel
- Namespace
- NOpenNLP.Tools.Ml.Maxent.Quasinewton
- Assembly
- NOpenNLP.Tools.dll
public class QNModel : AbstractModel, IMaxentModel
- Inheritance
-
QNModel
- Implements
- Inherited Members
Constructors
QNModel(Context[], string[], string[])
public QNModel(Context[] @params, string[] predLabels, string[] outcomeNames)
Parameters
Properties
NumOutcomes
Returns the number of outcomes for this model.
public override int NumOutcomes { get; }
Property Value
- int
The number of outcomes.
Methods
Eval(string[])
Evaluates a context.
public override double[] Eval(string[] context)
Parameters
contextstring[]A list of String names of the contextual predicates which are to be evaluated together.
Returns
- double[]
an array of the probabilities for each of the different outcomes, all of which sum to 1.
Eval(string[], double[])
Evaluates a context.
public override double[] Eval(string[] context, double[] probs)
Parameters
contextstring[]A list of String names of the contextual predicates which are to be evaluated together.
probsdouble[]An array which is populated with the probabilities for each of the different outcomes, all of which sum to 1.
Returns
- double[]
an array of the probabilities for each of the different outcomes, all of which sum to 1.
Eval(string[], float[])
Evaluates a contexts with the specified context values.
public override double[] Eval(string[] context, float[] values)
Parameters
contextstring[]A list of String names of the contextual predicates which are to be evaluated together.
valuesfloat[]The values associated with each context.
Returns
- double[]
an array of the probabilities for each of the different outcomes, all of which sum to 1.