Repository navigation
paramSets, repsPerSet: predict with parameter sets from a file - #41
Merged
Merged
Conversation
…n random numbers per replicate within a set Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
…Find and random-effect column errors Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
eliotmcintire
added a commit
that referenced
this pull request
Nov 15, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
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.
This lets a spread prediction use many parameter sets from a file, for example a whole fitting population, instead of only the fitted ones. Each set is used for a chosen number of replicates, so many sets can be scored cheaply.
Affects: nothing by default; with the new
paramSetssetting the simulated ELF predicts with the sets in the file.Reuses: spreadPredictRun(), spreadProbOneELF(), paramSetIndex(), ledgerLinkArgs(), ledgerCovMinMax()/ledgerCovCentre() (link, lower asymptote, gamma and centres stay from the ledger row), randomEffectSDOf(), fireSenseUtils::spreadRandomEffectTxt; new: paramSetsForRep() (reads the file and picks the set; nothing existing reads parameter sets from a file),
surfaceOutputsandmod$surface(cache of one set's outputs; no existing cache of them). fireSenseUtils::readSpreadFitLedger() is not used: it reads the Drive ledger by domain, not an arbitrary file; a file of ledger rows (aparamslist column) is read directly.Technical details
fireSense_spreadPredict.R: new paramsparamSets(path to .rds/.csv, default NA) andrepsPerSet(default 1L), new input.ELFind(finds the own ELF's row when there are several). InspreadPredictRun(), whenparamSetsis set, the own ELF'sparamsare replaced by one set (paramSetsForRep()); neighbours keep their rows, so blending is unchanged.paramSetIndex(nSets, ceiling(r / repsPerSet))and callsset.seed(k), k = ((r - 1) %% repsPerSet) + 1, sofireSense_burn's later draws are the same for every set (common random numbers). The set index goes intofireSense_SpreadParamSet.mod$surface, keyed on set index and the covariate table; same-set reps copy them, a new set recomputes. Time is not in the key (one covariate table, so it does not change the result).tests/testthat/test-paramSets.R, plustest-metadata.Rupdated for the new names): default unchanged; 2 sets x 2 reps use sets 1,1,2,2 with their own surfaces and sds (rds and csv); same-set reps reuse the surface (marker planted in the cache); same seed for the k-th rep of each set; a set equal to the ledger row gives an identical surface; missing coefficient stops; with two ELFs only the own ELF changes.convertToPackage()+test_local(), fireSenseUtils 0.2.3.9165 from the read-only dev library): branch 330 pass, 0 fail, 0 skip; base 303 pass, 0 fail, 0 skip. The new test file on base: 21 failures, 309 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6