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

params Context[]
predLabels string[]
outcomeNames string[]

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

context string[]

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

context string[]

A list of String names of the contextual predicates which are to be evaluated together.

probs double[]

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

context string[]

A list of String names of the contextual predicates which are to be evaluated together.

values float[]

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.