Skip to content

[Perf #478] GaussianNB Digits predict: vectorize class likelihood evaluation #484

Description

@godofecht

Parent: #478

Canonical v2 Digits is a very clean phase-localized loss: Flow fit is faster (1.122 ms vs sklearn 1.405 ms) but Flow predict is much slower (1.304 ms vs sklearn 0.538 ms), producing ~0.801x end-to-end despite exact score parity.

Profile per-class/per-feature Gaussian log-likelihood evaluation, repeated log/div operations, variance/mean loads, output reductions, memory layout and temporary allocation. Audit whether class constants can be precomputed during fit and whether prediction can be fused/vectorized.

Acceptance: prediction-stage profile; precompute-vs-runtime operation counts; batch-size and feature/class scaling curves; retained exact canonical score parity and learned-state parity for priors/means/variances; predict >=1.05x sklearn on Digits while preserving Iris's large win.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions