cv_baseline
Run a leakage-safe, cross-validated gradient-boosting baseline against a no-skill score, with time- or group-aware folds, to check if random validation overstates performance.
Instructions
Cross-validated gradient-boosting baseline reported next to a no-skill baseline. Encoders are fitted inside each training fold, so the scores are free of preprocessing leakage. With time_col the folds follow time; with group_col no group is split across folds. In both cases the same model is also scored with random folds, and the tool says whether random validation would overstate the score.
Args: train_path: training table. target: target column. id_col: ID column, excluded from the features. task: 'auto', 'binary', 'multiclass' or 'regression'. metric: the competition metric. Binary: roc_auc, pr_auc, log_loss, accuracy, f1, mcc. Multiclass: log_loss, accuracy, macro_f1, roc_auc_ovr, qwk, map@3 (any k). Regression: rmse, rmsle, mae, mape, r2, qwk. Default: roc_auc / log_loss / rmse. time_col: date or time-index column; folds train on the past and score the next time block. group_col: key column (customer, store, patient...); a group never sits in both parts of a fold. n_splits: number of folds. max_rows: train on a random sample of this many rows. oof_path: optional CSV path to save out-of-fold predictions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | auto | |
| id_col | No | ||
| metric | No | ||
| target | Yes | ||
| max_rows | No | ||
| n_splits | No | ||
| oof_path | No | ||
| time_col | No | ||
| group_col | No | ||
| train_path | Yes |