Data metrics validation

From VectorSpaceLab/AREX-Skill · View interactive version

Data metrics validation is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Validate auto-sklearn feature and target data, dataset compression, metrics, scoring functions, and resampling choices before running estimators.

How to use this skill

Skill file

Data Metrics Validation

Use this sub-skill when a task is about preparing inputs or scoring configuration for autosklearn estimators. It is drafted for the autosklearn Python package API compatible with 0.16.0dev / 0.16.0.dev0.

Scope

Use this sub-skill for:

Route elsewhere instead of expanding this sub-skill:

Fast operating checklist

  1. Prefer a pandas DataFrame for heterogeneous data. Set dtypes deliberately before fit():
  1. For NumPy arrays, keep the array numeric. If columns include encoded categorical/text concepts, pass feat_type=["Numerical", "Categorical", ...] to fit() with one label per feature.
  2. Run the bundled no-training helper in demo mode or on a small CSV before configuring an expensive AutoML run:

```bash

python scripts/validate_autosklearn_inputs.py --help

python scripts/validate_autosklearn_inputs.py

python scripts/validate_autosklearn_inputs.py --csv train.csv --target label --categorical-columns state,plan --string-columns review_text

```

  1. Build estimator configuration only after data checks pass. Keep data/metric/split choices together:

```python

import autosklearn.classification

import autosklearn.metrics

automl = autosklearn.classification.AutoSklearnClassifier(

metric=autosklearn.metrics.balanced_accuracy,

scoring_functions=[autosklearn.metrics.precision_macro, autosklearn.metrics.recall_macro],

resampling_strategy="holdout",

resampling_strategy_arguments={"train_size": 0.67, "shuffle": True},

dataset_compression={"memory_allocation": 0.1, "methods": ["precision", "subsample"]},

allow_string_features=True,

)

automl.fit(X_train, y_train, X_test=X_test, y_test=y_test, feat_type=None, dataset_name="my_dataset")

```

  1. If using CV or a custom/predefined splitter, plan a refit(X_train, y_train) before final predictions unless the downstream task explicitly wants fold-trained model behavior.

API anchors to remember

References

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.