Repository navigation
Add no-codebook baseline support and a self-referential prev-label source - #38
Merged
rcjackson merged 1 commit intoSep 16, 2026
Conversation
…urce Two changes to label_radar_data, both needed to make codebook ablations measurable. Allow definition-free categories. The prompt builder emitted the "Each category is defined as follows:" block unconditionally, so passing a category map with empty descriptions produced "No Precipitation: ; Stratiform Precipitation: ;". The block is now skipped when no category has a description, which makes a names-only control arm expressible: the model gets the class names and nothing else, so the codebook's contribution can be attributed instead of assumed. Behaviour is unchanged for every existing caller, since they all pass descriptions. Add previous_label_source, defaulting to "hand" (existing behaviour). use_previous_labels injected the *human* label of the preceding scan. When scans are closely spaced their labels rarely change, so that hint is close to the answer: on the BNF CSAPR2 set (~10 minute spacing), copying the previous hand label with no image at all reaches 0.80 macro-F1 against a two-human Dawid-Skene consensus, beating every model configuration measured there. Passing "llm" instead injects the model's own previous prediction, which keeps ground truth out of the prompt and matches what is available at inference time. The docstring states the trade-offs so the choice is not made by accident. Also imports pandas, which the new null-guard on the previous label needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 fixes the previous label pipeline to use the LLM label instead of the hand label.
🤖 Generated with Claude Code