grid_search
Finds optimal hyperparameters by testing all parameter combinations, returns best parameters and score, and saves the best model for later prediction and evaluation.
Instructions
Grid search for hyperparameter tuning. Tests all combinations and stores the best model. Returns the best parameters and score. The best model is saved for later predict/evaluate. Example: grid_search(target_column="Revenue", model_type="random_forest", param_grid={"n_estimators": [50,100,200], "max_depth": [5,10,20]})
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>",
"model_type": "<model_type>",
"param_grid": "<param_grid>"
},
"name": "grid_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n_folds | No | ||
| model_name | No | ||
| model_type | Yes | ||
| param_grid | Yes | ||
| target_column | Yes | ||
| train_df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |