godofecht / godofecht/flow-scikit

[Perf #478] LinearSVC: close liblinear-scale fit gap on Iris and Digits

Open
#479 1 comment 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

Current canonical v2 losses are real and large: Iris is ~0.613x end-to-end (Flow fit 1.580 ms vs sklearn 0.863 ms; prediction is already much faster), and Digits is ~0.216x (Flow fit 1650.7 ms vs sklearn 356.8 ms). The bottleneck is therefore overwhelmingly fit/solver work, not API overhead.

Audit and profile the LinearSVC training implementation against sklearn/liblinear. Attribute time to coordinate/gradient updates, multiclass strategy, convergence checks, memory layout, repeated dot products, allocation/copies and stopping criteria. Preserve canonical accuracy/parity.

Acceptance: dedicated fit flame/profile breakdown; operation-count comparison against sklearn/liblinear where practical; no avoidable per-sample/per-feature allocation; scaled 100/1k/10k+ sample benchmarks; Iris and Digits end-to-end >=0.95x first, target >=1.05x; prediction must not regress; learned weight/intercept state parity must be reported.

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 with the LinearSVC training implementation and profile fit separately on Iris and Digits. Compare coordinate or gradient updates, multiclass work, convergence checks, dot products, allocation and copies against sklearn/liblinear, then benchmark 100, 1k and 10k+ samples. Done means a dedicated profile, operation-count comparison, preserved accuracy and state parity, no avoidable per-sample or per-feature allocation, and no prediction regression.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.