Evaluating Models
by Alanlee0323
Expert system for evaluating machine learning models. Automates the analysis of Confusion Matrices, PR Curves, and MLflow history comparison to provide objective, data-driven recommendations.
Skill Details
Repository Files
1 file in this skill directory
name: evaluating-models description: Expert system for evaluating machine learning models. Automates the analysis of Confusion Matrices, PR Curves, and MLflow history comparison to provide objective, data-driven recommendations.
Model Evaluation Expert
When to use this skill
- When a training run completes.
- When the user asks "How is the model performing?".
- When comparing multiple experimental runs.
- When generating reports for stakeholders.
Core Capabilities
-
Deep Metric Analysis:
- Confusion Matrix: Identify specific class confusion (e.g., "Model constantly mistakes 'background' for 'person'").
- PR Curve (Precision-Recall): Analyze the trade-off. Is the model aggressive or conservative?
- F1-Score: Check the harmonic mean at different confidence thresholds.
-
Historical Benchmarking (MLflow):
- Rule: NEVER evaluate a run in isolation.
- Action: Query MLflow for the
best_run(highest mAP50 or mAP50-95). - Comparison: Calculate delta (e.g., "mAP50 improved by +2.5% vs baseline").
-
Objective Recommendations:
- Based on data, suggested next steps (e.g., "Increase background images", "Tune IoU threshold", "Add more samples for class X").
Workflow
1. Fetch Artifacts
Locate the evaluation artifacts (usually in runs/detect/trainX/ or MLflow):
confusion_matrix.pngPR_curve.pngresults.csv
2. Analyze & Compare
Run the comparison logic:
- Current mAP@50 vs Best Historical mAP@50
- Precision vs Recall balance check
3. Generate Report
Output a markdown report in the following format:
### 📊 Evaluation Report: [Run Name]
**🏆 Performance vs Baseline**
- **mAP@50**: 0.95 (+1.2% 🟢)
- **mAP@50-95**: 0.72 (-0.5% 🔻)
- **Best Run**: [Run ID] (0.938 mAP)
**🔍 Key Insights**
1. **Confusion**: Significant confusion between `dog` and `cat` (15% misclassification).
2. **Recall Risk**: High precision but low recall on `bicycle` class.
**💡 Recommendations**
- Collect more hard-negative samples for `cat`.
- Lower confidence threshold for `bicycle` deployment.
Anti-Hallucination Rules
- If artifacts are missing, say "Cannot evaluate without [Artifact Name]".
- Do not invent numbers.
- If MLflow is unreachable, compare against the "Manual Baseline" provided by the user.
Related Skills
Xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Clickhouse Io
ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
Analyzing Financial Statements
This skill calculates key financial ratios and metrics from financial statement data for investment analysis
Data Storytelling
Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.
Kpi Dashboard Design
Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Dbt Transformation Patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
Sql Optimization Patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
Anndata
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling large-scale biological datasets. Use when tasks involve AnnData objects, h5ad files, single-cell RNA-seq data, or integration with scanpy/scverse tools.
Xlsx
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
