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