Repository navigation
Predict with the smooth climate curve term from the ledger row's k and s - #53
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…s sd (replaces the hard hinge) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…l, climateTermBase); test that addAnnualYoungAge returns its input Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…265) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the spread model has the new optional dry-year climate term, a forecast now builds that term the same way the fit did. Without this, a fit made with the term could not be used for prediction.
Affects: Fits made with the new smooth climate curve term predict from it; every other ledger row predicts exactly as before. No new parameter.
Depends-on: PredictiveEcology/fireSenseUtils#265
Technical details
spreadProbOneELF()(fireSense_spreadPredict.R) has a new argumentclimateCurvePars, read from the ledger row at both call sites (one ELF and blended ELFs) withfireSenseUtils::ledgerClimateCurvePars(). For each fitted coefficient<var>_curveit callsfireSenseUtils::addClimateCurve()(softplus(<var> - k, s)) on the pixel's own raw<var>, beforesplitSpreadClimate()removes that variable, so it works withspreadClimateSplittoo. A curve coefficient with nokandsin the row, or no climate covariate, stops with a message naming it. The coefficient's sign is free; a negative value flattens the dry side.reqdPkgsfloorfireSenseUtils (>= 0.2.3.9193)is a placeholder until the fireSenseUtils PR merges and is bumped.Reuses:
fireSenseUtils::ledgerClimateCurvePars(),addClimateCurve(),climateTermBase(),isClimateTermCol(),climateCurveSuffix(fireSenseUtils#265) and the existingneeded/splitSpreadClimate()flow; new: none in this module.Tests: new
tests/testthat/test-climateCurve.R(prediction equals the hand value built with the fit'saddClimateCurve()from the storedkands; positive coefficient raises and negative lowers the prediction; missingk/sstops; a row without curve terms, even withk/sstored, predicts as before; with a split fit). Module suite (convertToPackage()+test_local(), scratch library, fireSenseUtils from the branch): base 120 test blocks, 426 passed, 0 failed; the new test file on the base code: 5 fail; branch 125 blocks, 435 passed, 0 failed. CItestthat-module / Test modulepasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh