Skip to content

Commit 9b7a575

Browse files
committed
update docs
1 parent 09f21e2 commit 9b7a575

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

pyfixest/estimation/demean_.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,16 +327,13 @@ def _set_demeaner_backend(
327327
"""Set the demeaning backend.
328328
329329
Currently, we allow for a numba backend, rust backend, jax backend, and cupy backend.
330-
JAX and CuPy are expected to be faster on GPU.
330+
JAX and CuPy are expected to be faster on GPU for larger problems, but not necessarily
331+
faster than the numba and rust algos.
331332
332333
Parameters
333334
----------
334335
demeaner_backend : Literal["numba", "jax", "rust", "cupy", "cupy32", "cupy64"]
335336
The demeaning backend to use.
336-
- "cupy": CuPy backend with float64
337-
- "cupy32": CuPy backend with float32
338-
- "cupy64": CuPy backend with float64
339-
340337
Returns
341338
-------
342339
Callable

pyfixest/estimation/estimation.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,15 @@ def feols(
138138
139139
demeaner_backend: DemeanerBackendOptions, optional
140140
The backend to use for demeaning. Options include:
141-
- "numba" (default): Fast CPU-based demeaning using Numba JIT
142-
- "jax": GPU-accelerated using JAX (requires jax/jaxlib)
143-
- "rust": Rust-based implementation
144-
- "cupy" or "cupy64": GPU-accelerated using CuPy with float64 precision (requires cupy & GPU, defaults to scipy/CPU if no GPU available)
145-
- "cupy32": GPU-accelerated using CuPy with float32 precision (requires cupy & GPU, defaults to scipy/CPU and float64 if no GPU available)
146-
- "scipy": Forces to use a scipy-sparse backend even when cupy is installed and GPU is available.
141+
- "numba" (default): CPU-based demeaning using Numba JIT via the Alternating Projections Algorithm.
142+
- "rust": CPU-based demeaning implemented in Rust via the Alternating Projections Algorithm.
143+
- "jax": CPU or GPU-accelerated using JAX (requires jax/jaxlib) via the Alternating Projections Algorithm.
144+
- "cupy" or "cupy64": GPU-accelerated using CuPy with float64 precision via direct application of the Frisch-Waugh-Lovell Theorem on sparse
145+
matrices (requires cupy & GPU, defaults to scipy/CPU if no GPU available)
146+
- "cupy32": GPU-accelerated using CuPy with float32 precision via direct application of the Frisch-Waugh-Lovell Theorem on sparse
147+
matrices (requires cupy & GPU, defaults to scipy/CPU and float64 if no GPU available)
148+
- "scipy": Direct application of the Frisch-Waugh-Lovell Theorem on sparse matrice.
149+
Forces to use a scipy-sparse backend even when cupy is installed and GPU is available.
147150
Defaults to "numba".
148151
149152
use_compression: bool
@@ -616,12 +619,15 @@ def fepois(
616619
617620
demeaner_backend: DemeanerBackendOptions, optional
618621
The backend to use for demeaning. Options include:
619-
- "numba" (default): Fast CPU-based demeaning using Numba JIT
620-
- "jax": GPU-accelerated using JAX (requires jax/jaxlib)
621-
- "rust": Rust-based implementation
622-
- "cupy" or "cupy64": GPU-accelerated using CuPy with float64 precision (requires cupy & GPU, defaults to scipy/CPU if no GPU available)
623-
- "cupy32": GPU-accelerated using CuPy with float32 precision (requires cupy & GPU, defaults to scipy/CPU and float64 if no GPU available)
624-
- "scipy": Forces to use a scipy-sparse backend even when cupy is installed and GPU is available.
622+
- "numba" (default): CPU-based demeaning using Numba JIT via the Alternating Projections Algorithm.
623+
- "rust": CPU-based demeaning implemented in Rust via the Alternating Projections Algorithm.
624+
- "jax": CPU or GPU-accelerated using JAX (requires jax/jaxlib) via the Alternating Projections Algorithm.
625+
- "cupy" or "cupy64": GPU-accelerated using CuPy with float64 precision via direct application of the Frisch-Waugh-Lovell Theorem on sparse
626+
matrices (requires cupy & GPU, defaults to scipy/CPU if no GPU available)
627+
- "cupy32": GPU-accelerated using CuPy with float32 precision via direct application of the Frisch-Waugh-Lovell Theorem on sparse
628+
matrices (requires cupy & GPU, defaults to scipy/CPU and float64 if no GPU available)
629+
- "scipy": Direct application of the Frisch-Waugh-Lovell Theorem on sparse matrice.
630+
Forces to use a scipy-sparse backend even when cupy is installed and GPU is available.
625631
Defaults to "numba".
626632
627633
drop_intercept : bool, optional

0 commit comments

Comments
 (0)