Skip to content

Solve again on the residual when fixed effects explain most of a variable - #87

Closed
matthieugomez wants to merge 1 commit into
FixedEffects:mainfrom
matthieugomez:lsmr-restart
Closed

matthieugomez wants to merge 1 commit into
FixedEffects:mainfrom
matthieugomez:lsmr-restart

Conversation

@matthieugomez

Copy link
Copy Markdown
Member

lsmr! stops relative to the norm of its right-hand side, so a variable with a large mean, or one mostly explained by the fixed effects, kept an error that was large relative to its residual: with a mean of 1e6 and tol = 1e-6, the residuals were off by about 16%. solve_residuals! now solves again on the residual when its norm is below sqrt(tol) times that of the right-hand side, so the residuals of a variable no longer depend on its mean. Ordinary variables never trigger the second solve; the only added cost is two norms.

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@1eab719). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #87   +/-   ##
=======================================
  Coverage        ?   59.95%           
=======================================
  Files           ?       12           
  Lines           ?     1251           
  Branches        ?        0           
=======================================
  Hits            ?      750           
  Misses          ?      501           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant