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]})
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 |