Class PerceptronModel
- Namespace
- NOpenNLP.Tools.Ml.Perceptron
- Assembly
- NOpenNLP.Tools.dll
public class PerceptronModel : AbstractModel, IMaxentModel
- Inheritance
-
PerceptronModel
- Implements
- Inherited Members
Constructors
PerceptronModel(Context[], string[], string[])
public PerceptronModel(Context[] @params, string[] predLabels, string[] outcomeNames)
Parameters
Methods
Eval(int[], double[], EvalParameters)
public static double[] Eval(int[] context, double[] prior, EvalParameters model)
Parameters
contextint[]priordouble[]modelEvalParameters
Returns
- double[]
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.
Eval(string[], float[]?, double[])
public virtual double[] Eval(string[] context, float[]? values, double[] outsums)
Parameters
Returns
- double[]