Skip to content
Back to skills

Linear Ood Calibration

ASecurity

Fit and inspect linear calibration between in-distribution and out-of-distribution accuracies.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill linear_ood_calibration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Linear Ood Calibration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Linear Ood Calibration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-linear-ood-calibration/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-linear-ood-calibration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: linear_ood_calibration
description: Fit and inspect linear calibration between in-distribution and out-of-distribution accuracies.
---

# Linear OOD Calibration

Use this skill after paired accuracy records have been validated. It implements the paper mechanism that OOD accuracy often lies on a line as ID accuracy varies across model variants.

## Inputs

- Validated records containing `model_id`, `id_accuracy`, and `ood_accuracy`.
- Optional residual threshold for interpreting fit quality.

## Outputs

- Least-squares slope and intercept mapping ID accuracy to OOD accuracy.
- Pearson correlation, mean absolute residual, and per-model predictions/residuals.
- A deterministic JSON summary suitable for recovery logs.

## Workflow

1. Extract paired ID/OOD arrays in deterministic record order.
2. Fit ordinary least squares with OOD accuracy as the dependent variable.
3. Compute Pearson correlation and residuals.
4. Return numeric evidence without deciding whether a soft-mode proxy is acceptable.
5. Use residuals to inspect weak-shift or outlier behavior.

## Validation

Run `python scripts/fit_accuracy_line.py --input <validated_records.json>` or run the included tests through `validate_skill_tree.py --run-tests`.

## Limitations

This skill does not validate input records, choose the dataset, or claim full paper reproduction. It assumes records already obey the pair protocol.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…