New (optional) demeaning backend via `within`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Python
- スター
- 1.1k
- フォーク
- 203
- 平均マージ
- 3時間 26分
- マージ済み PR(30日)
- 115
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bashtage/linearmodels のほかの issue
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
bashtage/linearmodels#832 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bashtage/linearmodels#831 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
IV: LIML kappa with an endogenous regressor spanned by the instruments, kappa's unit dependence, scale-dependent instrument rank check対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bashtage/linearmodels#823 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
bashtage/linearmodels#817 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bashtage/linearmodels#780 ·
メンテナーはふだん 1 日以内に返信
bashtage/linearmodels の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NousResearch/hermes-agent#147104 ·
メンテナーはふだん 1 日以内に返信
-
premises-missing
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
WingedGuardian/GENesis-AGI#3801 ·
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document new required `shared-org-key` input for `obs-aw-dependency-review`対応中かも @github-actions が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
bot-triaged module: inductor oncall: pt2 topic: fuzzer triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信