Skip to content
Back to skills

Model Evaluation

ASecurity

Model evaluation criteria and QA compliance thresholds

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 12, 2026
testingpythongobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add aibot88/sec_skill_store --skill model-evaluation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Evaluation?

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

Security grade badge for Model Evaluation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aibot88-model-evaluation/badge)](https://www.skillsdirectory.com/skills/aibot88-model-evaluation)

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

Download with Pro
SKILL.md
---
name: model-evaluation
description: Model evaluation criteria and QA compliance thresholds
license: MIT
compatibility: opencode
metadata:
  audience: engineers
  workflow: model-validation
---

## What I Do

I document the model evaluation methodology and Quality Assurance (QA) gates
for this project. When an agent works on model training, evaluation, or QA
reporting, I provide the acceptance criteria so it knows what "good enough"
means.

## QA Acceptance Thresholds

These are defined in `app/src/qa_report.py` — `SUCCESS_CRITERIA`:

| Task | Metric | Threshold |
|------|--------|-----------|
| Regression (avg_cpu) | R² | >= 0.70 |
| Regression (avg_cpu) | MAPE / WMAPE | informational — zero-inflated target (see tech spec §1.5) |
| Regression (cost, waste) | MAPE | <= 15.0% |
| Regression (cost, waste) | R² | >= 0.70 |
| Classification | F1 | >= 0.85 |
| Clustering | Silhouette score | >= 0.30 |
| Time series | MAE | <= 5.0 |

## Evaluation Methodology

### Train/Test Split

Always use chronological split (no leakage):

```python
from app.src.models import train_test_split_by_time
train_df, test_df = train_test_split_by_time(df, timestamp_col='timestamp_created', test_size=0.2)
```

### Supported Tasks

- `regression_avg_cpu` — predict average CPU utilisation
- `regression_waste` — predict waste fraction
- `regression_cost` — predict VM cost
- `classification_idle` — binary: is VM idle?
- `classification_tier` — multi-class: waste tier (Low/Medium/High)

### Feature Sets

- `all` — core numeric + temporal features
- `minimal` — core numeric features only
- `no_temporal` — core numeric without temporal encoding

## Model Wrappers

All models follow the `BaseModel` ABC with `fit`, `predict`, `evaluate`, `save`:

| Class | Underlying Estimator |
|-------|---------------------|
| `RidgeModel` | `sklearn.linear_model.Ridge` |
| `RandomForestModel` | `sklearn.ensemble.RandomForestRegressor` / `RandomForestClassifier` |
| `XGBoostModel` | `xgboost.XGBRegressor` / `XGBClassifier` |
| `ClusterModel` | `sklearn.cluster.KMeans` (with `StandardScaler`) |
| `AnomalyModel` | `sklearn.ensemble.IsolationForest` |
| `GenericModel` | Fallback for loading unknown saved models |

## Model Comparison

Use `comparison_table()` from `app.src.visualize`:

```python
from app.src.visualize import comparison_table
df = comparison_table(results)  # rows=models, cols=metrics
```

Best values per metric are auto-highlighted (lower is better for
MAE/RMSE/MSE, higher is better for everything else).

## QA Report

Generate the compliance report:

```bash
python -m app.src.qa_report
```

This reads `models/run_log.csv` and checks each run against the success
criteria table above. The report prints:
- Total runs, passing, failing, pass rate
- Breakdown by task type
- Specific failure reasons per model run

Files in this skill

  • SKILL.md2.8 KB
  • source.json578 B

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.