cross_validate
Evaluates model performance with k-fold cross-validation, returning mean and std of scores. Detects overfitting when train scores exceed test scores, more reliable than a single split.
Instructions
K-fold cross-validation. Returns mean and std of scores across folds. More reliable than a single train/test split. Detects overfitting when train >> test scores. Example: cross_validate(target_column="Revenue", model_type="random_forest", n_folds=5)
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": {
"target_column": "<target_column>"
},
"name": "cross_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| df_name | No | ||
| n_folds | No | ||
| model_type | No | random_forest | |
| hyperparams | No | ||
| target_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |