Skip to content

Predict with the intercept and centres of a ledger row - #25

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/spread-intercept
Oct 5, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/spread-intercept

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Depends-on: PredictiveEcology/fireSenseUtils#131

spreadProbOneELF() (fireSense_spreadPredict.R) split a row's parameters into covariate coefficients and logistic parameters by covariate name, so an (Intercept) coefficient would have been read as a logistic parameter, and it had no way to subtract the covariate centres a fit made with an intercept used. It now adds a column of 1s for fireSenseUtils::spreadInterceptTxt when the row has it, and subtracts the row's stored centres (covCentre_spread, read by ledgerCovCentre(), one per ELF) from the rescaled covariates, as the fit did.

The default is off: a row without an intercept or centres, such as every row written so far, predicts exactly as before (compared in the tests, and an older row beside one with centres in a two-ELF run). New test-spreadIntercept.R (6 tests) fails on the base module and passes here; full module suite 54 tests, 0 failed (base 48, 0 failed), run against fireSenseUtils#131. No reqdPkgs floor yet: the fireSenseUtils version does not exist on development until #131 merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

A row with an intercept and stored covariate centres is predicted with both; a row without them predicts as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit a169186 into development Oct 5, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the feat/spread-intercept branch October 5, 2026 17:03
eliotmcintire added a commit that referenced this pull request Oct 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
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