Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias NavOptions

    how the model reads its history; every field is optional

    type NavOptions = {
        alpha?: number;
        backoff?: number;
        halfLife?: number;
        maxContexts?: number;
        maxNext?: number;
        order?: 1 | 2;
        prior?: Record<string, Record<string, number>>;
    }
    Index
    alpha?: number

    pseudo-observations that pull each row toward its prior

    backoff?: number

    the two-pattern row weighs n / (n + backoff) against the one-pattern row, n being its observations

    halfLife?: number

    observations until a count has lost half its weight; Infinity turns decay off

    maxContexts?: number

    contexts kept in each table

    maxNext?: number

    next routes kept per context

    order?: 1 | 2

    1 predicts from the last route pattern; 2 uses the last two and backs off to 1

    prior?: Record<string, Record<string, number>>

    counts per one-pattern context, as a population or a public corpus would give them