~/talk

3 Ways to Speed up Your Regression Modeling in Python

Talkat PyCon DE & PyData 2025 · on Friday, 2025-04-25· at 14:40· Titanium3· [data-science, machine-learning]
links:none on file
slides:none on file

Benchmarks show a 20 million–row regression with 60 one‑hot features runs ~10s with a naive normal‑equation, speeds ~30% using sparse matrices (scikit‑learn / scipy), drops to ~2.7s using the Frisch‑Waugh‑Lovell theorem (pyfixest) and to ~4s with out‑of‑memory aggregation via DuckDB compression, which reduces the data to ~2k unique strata and fits lossless weighted least squares returning matching coefficients and recoverable standard errors; JAX/GPU demeaning experiments also give further speedups.

AI-written summary · about

  1. 0:00Regression speed challenges
  2. 1:30Use case and dataset
  3. 4:02Baseline model
  4. 5:49Large model challenges
  5. 7:15Speed-up strategies
  6. 8:40Sparse data structures
  7. 11:07Batch regression
  8. 14:44Frisch-Waugh-Lovell theorem
  9. 18:19Data compression
  10. 27:57Out-of-memory regression
  11. 28:19Benchmarking summary
  12. 31:08GPU acceleration
  13. 31:51Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.