uq-metrics-evaluator
Skill30 starsChanged 52 days agoBSD-2-ClauseView on GitHub
Use when the user asks for model evaluation, accuracy, calibration, or uncertainty quantification (UQ) analysis from CSV data. Handles both regression (MAE, RMSE, R², calibration) and classification (accuracy, F1, ROC-AUC, ECE, confusion matrix). Discovers the right CSV files and columns from prompt intent, then runs evaluation with artifact outputs.
In this repository30 other files it gives its agents.
- skills/academy/agents.mdAGENTS.md
- academySkill
- amsc-data-movement-apiSkill
- amsc-magSkill
- amsc-python-clientSkill
- globus-computeSkill
- i2-apiSkill
- iri-apiSkill
- skill-explorerSkill
- croissant-validatorSkill
- datacard-generatorSkill
- hdmf-schema-builderSkill
- skill-creatorSkill
- well-convertSkill
- card-eval-updaterSkill
- agentic-vulnerabilities-scanSkill
- ai-fingerprintSkill
- battleprintSkill
- fingerprintingSkill
- uncertainty-quantificationSkill
- skill-searchSkill
- auroraSkill
- frontierSkill
- pbsSkill
- perlmutterSkill
- slurmSkill
- literature-searchSkill
- multi-agent-systemsSkill
- gkeyllSkill
- gs2Skill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Use ephemeral uv run --with execution to avoid creating dependency files in the repository.
- Very specific: line 71
If dependency or import errors appear, add missing packages via --with and rerun.
- Distinctive: line 86
When ambiguous, inspect the prediction column with csv_reader_tool and use dtype and cardinality to decide.
- Distinctive: line 92
Start from paths explicitly named by the user.
- Distinctive: line 93
If user gives a directory, list CSV files and rank by filename hints:
- Distinctive: line 97
If one file appears to contain both predictions and truth, use it for both inputs.
- Distinctive: line 101
Run csv_reader_tool on each candidate file first.
- Distinctive: line 117
If predicted class + truth found, run hard-label metrics (accuracy, F1, precision, recall, confusion matrix).
- Very specific: line 118
If a probability column is also found and the user asks for calibration or UQ, include ECE/MCE/Brier + reliability diagram.
- Distinctive: line 119
If probability column missing, run hard-label metrics only and report calibration skipped.
- Distinctive: line 139
Before finalizing analysis, verify:
- Distinctive: line 148
If checks fail, explain what failed, propose 2–3 alternative columns, and ask for clarification only when needed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Model Accuracy and Calibration Analysis
Arguments
The user provides a dataset or folder path and optional flags.
Expected format: <dataset_or_folder> [--task {regression|classification}] [--pred <file>] [--truth <file>]
What to specify:
- Dataset or folder path to analyze
- Task type (regression or classification) if not auto-detectable
- Specific prediction/truth/probability column names or files if needed
Examples:
./data— auto-discover files in directorypredictions.csv ground_truth.csv— explicit files./results --task classification— force classification mode
Overview
This skill performs end-to-end model evaluation from CSV files using two tools:
- csv_reader_tool — schema/statistics inspection
- evaluate_metrics_tool — regression accuracy and UQ calibration
- evaluate_classification_tool — classification metrics and probabilistic calibration
Core behavior:
- Determine task type (regression or classification) from the user's prompt and inspected column types.
- Discover and inspect candidate CSV files.
- Select relevant columns and run the appropriate evaluation tool.
- Return a concise analysis with artifact locations.
Environment Bootstrap
Use ephemeral uv run --with execution to avoid creating dependency files in the repository.
Schema inspection (both task types):
uv run --with pandas --with pydantic \
scripts/csv_reader_tool.py <file.csv>Regression evaluation:
uv run --with pandas --with pydantic --with numpy --with uncertainty-toolbox --with matplotlib --with seaborn \
scripts/evaluate_metrics_tool.py <predictions.csv> <ground_truth.csv> \
--pred-col <prediction_column> \
--truth-col <truth_column> \
[--uncertainty-col <uncertainty_column>]Classification evaluation:
uv run --with pandas --with pydantic --with numpy --with scikit-learn --with matplotlib --with seaborn \
scripts/evaluate_classification_tool.py <predictions.csv> <ground_truth.csv> \
--pred-col <predicted_class_column> \
--truth-col <true_label_column> \
[--prob-col <positive_class_prob_column>] # binary only
[--prob-cols <class0_prob> <class1_prob> ...] # multiclassValidation loop for execution:
- Run the command.
- If dependency or import errors appear, add missing packages via
--withand rerun. - Repeat until the command succeeds.
Task Type Routing
Determine task type before selecting columns:
| Signal | Route to |
| Prompt mentions "regression", "RMSE", "MAE", "R²", "residuals", "continuous" | Regression |
| Prompt mentions "classification", "F1", "accuracy", "confusion matrix", "AUC", "labels", "classes" | Classification |
| Prediction column is continuous numeric (float, wide range) | Regression |
| Prediction column is categorical or integer with few unique values | Classification |
| Uncertainty column present with no class labels | Regression |
When ambiguous, inspect the prediction column with csv_reader_tool and use dtype and cardinality to decide. Ask the user only if inspection is inconclusive.
Decision Logic
1. Resolve candidate CSV files
- Start from paths explicitly named by the user.
- If user gives a directory, list CSV files and rank by filename hints:
- predictions-like:
pred,prediction,inference,forecast,output - truth-like:
truth,target,label,actual,ground - uncertainty/probability-like:
uncert,sigma,std,prob,score
- predictions-like:
- If one file appears to contain both predictions and truth, use it for both inputs.
2. Inspect schemas before selecting columns
Run csv_reader_tool on each candidate file first. Prefer columns that are numeric, low missingness, and semantically matched to user language.
3. Map semantic roles to columns
Regression:
- Prediction (
--pred-col):y_pred,pred,prediction,mean,mu,forecast - Truth (
--truth-col):y,y_true,truth,ground_truth,actual,target - Uncertainty (
--uncertainty-col):sigma,std,stddev,uncertainty,pred_std
Classification:
- Predicted class (
--pred-col):y_pred,pred,prediction,class,label_pred - True label (
--truth-col):y,y_true,label,ground_truth,actual,target - Binary probability (
--prob-col):prob,score,prob_pos,p_pos,probability - Multiclass probabilities (
--prob-cols): one column per class, ordered to match class order
Branching (classification):
- If predicted class + truth found, run hard-label metrics (accuracy, F1, precision, recall, confusion matrix).
- If a probability column is also found and the user asks for calibration or UQ, include ECE/MCE/Brier + reliability diagram.
- If probability column missing, run hard-label metrics only and report calibration skipped.
Output Contract
Regression — return:
- Chosen files and columns (+ rationale).
- Accuracy metrics:
mae,rmse,r2,corr,row_count. - UQ calibration (when available):
mean_calibration_error,rms_calibration_error,miscalibration_area,sharpness,nll. - Artifacts: residuals CSV + residual distribution PNG; calibration CSV + calibration plot PNG.
Classification — return:
- Chosen files and columns (+ rationale).
- Hard-label metrics:
accuracy,precision_macro,recall_macro,f1_macro,num_classes,row_count. - Probability metrics (when available):
roc_auc,log_loss. - Calibration (when probability column present):
expected_calibration_error,max_calibration_error,brier_score. - Artifacts: confusion matrix CSV + heatmap PNG; reliability diagram PNG (if probabilities available).
- Any skipped steps or assumptions.
Quality Checks
Before finalizing analysis, verify:
- Selected columns exist in the inspected schema.
- Prediction/truth lengths are compatible.
- Non-null rows remain after filtering.
- For regression: prediction and truth columns are numeric.
- For regression calibration: uncertainty values are strictly positive.
- For classification: at least 2 unique classes are present in truth column.
- For classification probabilities: probability columns are numeric and in [0, 1].
If checks fail, explain what failed, propose 2–3 alternative columns, and ask for clarification only when needed.
Procedure
- Parse the user-provided files, directory, column hints, and task type.
- Determine task type (regression vs. classification) from prompt and schema inspection.
- Discover and inspect candidate CSV files with csv_reader_tool.
- Select file pair and column mapping.
- Execute the appropriate evaluation tool.
- Summarize metrics and interpret model behavior.
- Report artifact paths for follow-on visualization or debugging.
Common Mistakes
| Mistake | Fix |
| Running regression tool on class label columns | Inspect cardinality; route to classification tool |
| Running classification tool on continuous outputs | Inspect dtype and range; route to regression tool |
Using --prob-col for multiclass | Use --prob-cols with one column per class |
| Requesting calibration without probability column | Run hard-label metrics only; report calibration skipped |
| Mixing row-misaligned files | Use same-row datasets or ask for join key workflow |
| Guessing columns without inspection | Always run csv_reader_tool first |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

