Class Context
Class which associates a real valued parameter or expected value with a particular contextual predicate or feature. This is used to store maxent model parameters as well as model and empirical expected values.
public class Context
- Inheritance
-
Context
- Derived
- Inherited Members
Constructors
Context(int[], double[])
Creates a new parameters object with the specified parameters associated with the specified outcome pattern.
public Context(int[] outcomePattern, double[] parameters)
Parameters
outcomePatternint[]Array of outcomes for which parameters exists for this context.
parametersdouble[]Parameters for the outcomes specified.
Fields
outcomes
The outcomes which occur with this context.
protected readonly int[] outcomes
Field Value
- int[]
parameters
The real valued parameters or expected values for this context.
protected readonly double[] parameters
Field Value
- double[]
Properties
Outcomes
Returns the outcomes for which parameters exists for this context.
public virtual int[] Outcomes { get; }
Property Value
- int[]
Array of outcomes for which parameters exists for this context.
Parameters
Returns the parameters or expected values for the outcomes which occur with this context.
public virtual double[] Parameters { get; }
Property Value
- double[]
Array of parameters for the outcomes of this context.
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.