Benchmark Models
benchmark_modelsCross-validate candidate models on a split's training rows, rank them by average cross-validation score, and compare mean, standard deviation, and fit time without touching test data.
Instructions
Cross-validate several candidate models on the TRAINING rows of a split and rank them by their average score. More reliable than compare_models: every model is scored on several folds (mean and standard deviation), timings are included, and the test rows are never touched. Nothing is stored in Models; train the winner with its own tool (or compare_models) afterwards. The split must have only numerical, complete features. Args: split_id (str): ID of a split made by train_test_split. models (list[str], optional): Training tool names to try (same names and defaults as compare_models). task (str): "auto" (inferred from the target), "regression" or "classification". Default is "auto". cv (int): Number of folds, 2 to 10. Classification is stratified and uses at most as many folds as the smallest class has rows. Default is 5. sort_by (str, optional): Metric that ranks the models (mean over folds). Regression: r2 (default), mae, mse, rmse. Classification: f1 (default), accuracy, balanced_accuracy, precision, recall, roc_auc. include_slow (bool): Also run SVM on large data (over 10,000 training rows). Default is False. Returns: dict: leaderboard with mean and std of every metric, mean fit time, which models are statistically comparable to the best (within one standard deviation), failed/skipped models and notes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"split_id": "<split_id>"
},
"name": "benchmark_models"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cv | No | ||
| task | No | auto | |
| models | No | ||
| sort_by | No | ||
| split_id | Yes | ||
| include_slow | No |