compare
Backtest multiple candidate configurations on the same cross-validation folds, rank them by a chosen metric, and return the winning plan for selection.
Instructions
Backtest several configurations on the same folds and rank them by metric. Reports progress per candidate and can be cancelled between candidates. Returns a comparison id and the plan of the winner in links.best_plan_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cv_id | Yes | Id returned by `create_cv`: every candidate is backtested on its folds. | |
| metric | No | Metric of every candidate. Metric, or list of metrics whose first one is the primary metric (the one that ranks); only the ones given are computed. Null for the metric chosen for the plan the strategy was built for, if one was chosen, else the one selected from the data. | |
| baseline | No | Whether to add a seasonal naive baseline (ForecasterEquivalentDate) to the ranking. | |
| interval | No | Prediction interval computed for every candidate. Prediction interval as two quantiles [lower, upper] with 0 < lower < upper < 1, e.g. [0.1, 0.9] for 80 %. The baseline and ForecasterStats only take symmetric ones (lower + upper = 1). Null for the interval of the plan the strategy was built for. | |
| candidates | No | Configurations to compare, each {'name': ..., 'config': {...}}, e.g. [{'name': 'ridge', 'config': {'estimator': 'Ridge'}}]. Null for the candidates recommended by the profile: the forecasters of its family (with several series, ForecasterRecursiveMultiSeries and ForecasterFoundation), or the estimators of the recommended forecaster when that leaves one, without those above 500 estimator fits; plus the plan the strategy was built for, in the row 'Strategy plan', when it is none of them. The summary names the row of that plan. A candidate that fails is ranked last with its error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| cost | No | ||
| kind | Yes | ||
| files | No | ||
| links | No | ||
| notices | No | ||
| summary | Yes | ||
| changeable | No | ||
| notices_omitted | No | ||
| values_included | No | ||
| summary_truncated | No |