Class UniformPrior
Provide a maximum entropy model with a uniform prior.
public class UniformPrior : IPrior
- Inheritance
-
UniformPrior
- Implements
- Inherited Members
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.
LogPrior(double[], Context[], float[])
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
public virtual void LogPrior(double[] dist, Context[] context, float[] values)
Parameters
distdouble[]An array to be populated with the log of the prior distribution.
contextContext[]The indices of the contextual predicates for an event.
valuesfloat[]The values associated with the context.
LogPrior(double[], int[])
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
public virtual void LogPrior(double[] dist, int[] context)
Parameters
distdouble[]An array to be populated with the log of the prior distribution.
contextint[]The indices of the contextual predicates for an event.
LogPrior(double[], int[]?, float[]?)
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
public virtual void LogPrior(double[] dist, int[]? context, float[]? values)
Parameters
distdouble[]An array to be populated with the log of the prior distribution.
contextint[]The indices of the contextual predicates for an event.
valuesfloat[]The values associated with the context.
SetLabels(string[], string[])
Method to specify the label for the outcomes and contexts. This is used to map integer outcomes and contexts to their string values. This method is called prior to any call to #logPrior.
public virtual void SetLabels(string[] outcomeLabels, string[] contextLabels)