godofecht / godofecht/flow-scikit

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

Open
#484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
0
Avg merge
4h 33m
Merged PRs (30d)
9

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the GaussianNB Digits prediction path and run the canonical v2 benchmark while profiling per-class/per-feature Gaussian log-likelihood evaluation. Compare precomputed versus runtime operation counts and measure batch-size and feature/class scaling. Done means exact score and learned-state parity, prediction at least 1.05x sklearn on Digits, and Iris's large win is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.