Revamp Section 6 presence-background evaluation - #10
Draft
mrecos wants to merge 2 commits into
Draft
Conversation
Make common 7x7 focal support the primary Section 6 design and score one fixed, uniform raster-availability sample in every spatially grouped fold. Convert held-out predictions to fold-specific availability ranks, pool every bag once per repeat, and lead with mapped-area capture, tie-aware lift/gain, Continuous Boyce, and site percentile distributions. Add the deterministic runner, configuration, result schema, fingerprints, fold-safe availability maps, geometry control, M0-M3 and LR/RF comparisons, support sensitivity modes, progress reporting, and reusable notebook builder. Streamline notebook 05 into one coherent report while retaining ROC AUC and PR AUC as secondary diagnostics. Reuse raster handles for batched windows and derive nested focal supports from the largest read to reduce preparation time. Add notebook dependencies, CI formatting/lint coverage, methodological documentation, and tests for availability metrics, tied thresholds, window batching, fold coverage, schemas, and runner behavior. Validation: 148 pytest tests passed; Black, Ruff, Mypy, pyproject parsing, real riverine preparation, a bounded real-data LR fold run, schema validation, and an executed notebook smoke test passed.
Reframe presence-background evaluation around mapped-area capture, lift, and capture surplus while retaining Kvamme Gain and classification metrics as secondary evidence. Add full-window and exact valid-cell-count controls, raster-mask boundary diagnostics, and exploratory Moran/LISA analysis of held-out site shortfall and model disagreement. Regenerate the reporting notebook, update the result contract and documentation, and add deterministic tests for the new metrics and controls. Record the completed Section 6 findings, unresolved upland boundary question, output-scaling concern, and restart priorities in a dated branch handoff.
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.
Summary
Scientific rationale
Section 6 is presence–background, not presence–confirmed-absence. The constructed background prevalence and a binary threshold are therefore not the main prospection questions. This revision evaluates how efficiently a fixed mapped-area budget captures held-out sites and whether sites concentrate toward higher mapped suitability.
Each fold gets the same availability anchors. Scores from independently fitted folds are placed on a common availability-rank scale before pooling. Tied thresholds explicitly record the achieved mapped fraction and use that achieved fraction—rather than the nominal budget—as the denominator for lift and gain, which avoids favoring discrete models such as random forests.
The geometry-only negative control remains visible. Strong geometry performance under common focal support is treated as a design warning. No method is promoted or removed from this single physio-shed.
Notebook workflow
notebooks/05_section6_model_validation.ipynbnow follows one reading order:The notebook runs the primary evaluation automatically when no result exists and loads cached ignored output on later runs.
benchmarks/build_section6_evaluation_notebook.pyregenerates it.Validation
pyproject.tomlparsed successfullyDependency
This is a stacked draft PR targeting
codex/representation-extensionsbecause PR #9 has passed CI but still awaits explicit merge approval. After #9 is merged, retarget this PR tomain; its diff will then contain only the evaluation revamp.Untracked
* 2.*sync-copy artifacts were deliberately excluded.