Class HierarchNGram<T>
Hierarchical N-Gram.
public class HierarchNGram<T> : INGram<T>
Type Parameters
T
The type of the actions.
- Inheritance
-
HierarchNGram<T>
- Implements
-
INGram<T>
- Inherited Members
Constructors
HierarchNGram(int, int)
Creates a new hierarchical N-Gram.
public HierarchNGram(int nValue, int threshold)
Parameters
nValue
intThe N in N-Gram (window size + 1).
threshold
intMinimum number of observations for a specific N-Gram to return a prediction.
Properties
NValue
The N in N-Gram (window size + 1).
public int NValue { get; }
Property Value
Methods
GetMostLikely(IReadOnlyList<T>)
Get the most likely action given a sequence of actions.
public T GetMostLikely(IReadOnlyList<T> actions)
Parameters
actions
IReadOnlyList<T>The actions list, which should be at least of size 1.
Returns
- T
The most likely action for the given a sequence of actions.
RegisterSequence(IReadOnlyList<T>)
Register a sequence of actions.
public void RegisterSequence(IReadOnlyList<T> actions)
Parameters
actions
IReadOnlyList<T>The actions list, which should be at least of size 1.