godofecht / godofecht/flow-scikit
[Perf #478] GaussianNB Digits predict: vectorize class likelihood evaluation
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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