New (optional) demeaning backend via `within`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start by reading the AbsoringLS backend and the linked within solver documentation to understand the existing demeaning path and the proposed solver. The issue does not specify integration details or tests; done would mean an agreed, optional backend is implemented and validated against the existing behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi @bashtage,
Over the last couple of months, we (mostly @schroedk) have spent quite a bit of time developing a faster demeaning algorithm for fixed effects regression that works particularly well for poorly-connected fixed effects (as e.g. in worker firm panels with little mobility). The core idea is to replace the diagonal preconditioner that linearmodels current LSMR implementation uses with an additive Schwarz preconditioner.
For some fixed effects structures, this new preconditioner works much better than diagonal LSMR:
We have Python bindings published to PyPi as within_py that has a pretty simple API. Here is how you'd fit a simple FWL problem:
beta_true = np.array([1.0, -2.0, 0.5])
X = np.random.randn(n, 3)
y = X @ beta_true + np.random.randn(n)
result = solve_batch(fe, np.column_stack([y, X]))
y_tilde, X_tilde = result.demeaned[:, 0], result.demeaned[:, 1:]
beta_hat = np.linalg.lstsq(X_tilde, y_tilde, rcond=None)[0]
print(np.round(beta_hat, 4)) # [ 0.9982 -2.006 0.5005]
If you are curious how the solver works, we have written up details here and here.
Would you be interested to try this out as a second, optional solver for the AbsoringLS backend? If yes, I'd set up a draft PR in the next days / weeks.
Best, Alex
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 203
- Merge trung bình
- 3 giờ 26 phút
- Pull request đã merge (30 ngày)
- 115
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bashtage/linearmodels
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
bashtage/linearmodels#832 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bashtage/linearmodels#831 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
IV: LIML kappa with an endogenous regressor spanned by the instruments, kappa's unit dependence, scale-dependent instrument rank checkCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bashtage/linearmodels#823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
bashtage/linearmodels#817 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
bashtage/linearmodels#780 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bashtage/linearmodels
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationCó thể đã có người làm @muskan-creates352 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
mllam/neural-lam#848 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
infra
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
fab-geocommuns/RNB-coeur#1166 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepspeedai/DeepSpeed#8951 ·
Maintainer thường phản hồi trong vòng 2 ngày