Type Alias NavOptions
type NavOptions = {
alpha?: number;
backoff?: number;
halfLife?: number;
maxContexts?: number;
maxNext?: number;
order?: 1 | 2;
prior?: Record<string, Record<string, number>>;
}
alpha?: number;
backoff?: number;
halfLife?: number;
maxContexts?: number;
maxNext?: number;
order?: 1 | 2;
prior?: Record<string, Record<string, number>>;
}
Properties
Optionalalpha
alpha?: number
pseudo-observations that pull each row toward its prior
Optionalbackoff
backoff?: number
the two-pattern row weighs n / (n + backoff) against the one-pattern row, n being its observations
Optionalhalf Life
halfLife?: number
observations until a count has lost half its weight; Infinity turns decay off
Optionalmax Contexts
maxContexts?: number
contexts kept in each table
Optionalmax Next
maxNext?: number
next routes kept per context
Optionalorder
order?: 1 | 2
1 predicts from the last route pattern; 2 uses the last two and backs off to 1
Optionalprior
prior?: Record<string, Record<string, number>>
counts per one-pattern context, as a population or a public corpus would give them
how the model reads its history; every field is optional