Skip to content

Add no-codebook baseline support and a self-referential prev-label source - #38

Merged
rcjackson merged 1 commit into
ARM-Development:mainfrom
rcjackson:nocodebook-and-prev-label-source
Sep 16, 2026
Merged

rcjackson merged 1 commit into
ARM-Development:mainfrom
rcjackson:nocodebook-and-prev-label-source

Conversation

@rcjackson

@rcjackson rcjackson commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This fixes the previous label pipeline to use the LLM label instead of the hand label.
🤖 Generated with Claude Code

…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>
@rcjackson
rcjackson merged commit 602396e into ARM-Development:main Sep 16, 2026
4 checks passed
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