Rank Models
rank_modelsRanks trained machine-learning models by stored metrics without retraining, helping compare candidates and flag mixed splits or overfitting.
Instructions
Rank models that are already trained (by any training tool or compare_models) using their stored metrics. Nothing is retrained. Models are only comparable when they predict the same target; models trained on different splits are ranked too, but flagged because their test rows differ. Args: model_ids (list[str], optional): Models to rank. Default: every trained model (narrowed by split_id / task). split_id (str, optional): Only rank models trained on this split. task (str): "auto", "regression" or "classification". With "auto" all chosen models must be of one task. sort_by (str, optional): Metric to rank by. Regression: r2 (default), mae, mse, rmse, mape_percent. Classification: f1 (default), accuracy, balanced_accuracy, precision, recall, roc_auc, f1_macro. dataset (str): "test" (default) or "train". Ranking by train rewards overfitting; use it for diagnosis only. top_n (int, optional): Only list the best n models (ranks are still computed over all of them). Returns: dict: ranking (rank, model_id, algorithm, score, train and test metrics, generalisation gap), best_model_id, models skipped (no stored metrics) and notes (ties, mixed splits, overfitting).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "rank_models"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | auto | |
| top_n | No | ||
| dataset | No | test | |
| sort_by | No | ||
| split_id | No | ||
| model_ids | No |