TimeSeriesPredictor.leaderboard¶
- TimeSeriesPredictor.leaderboard(data: TimeSeriesDataFrame | DataFrame | Path | str | None = None, display: bool = False, use_cache: bool = True, **kwargs) DataFrame[source]¶
Return a leaderboard showing the performance of every trained model, the output is a pandas data frame with columns:
model: The name of the model.score_test: The test score of the model ondata, if provided. Computed according toeval_metric.score_val: The validation score of the model using the internal validation data. Computed according toeval_metric.
Note
Metrics scores are always shown in ‘higher is better’ format. This means that metrics such as MASE or MAPE will be multiplied by -1, so their values will be negative. This is necessary to avoid the user needing to know the metric to understand if higher is better when looking at leaderboard.
pred_time_val: Time taken by the model to predict on the validation data setfit_time_marginal: The fit time required to train the model (ignoring base models for ensembles).fit_order: The order in which models were fit. The first model fit hasfit_order=1, and the Nth model fit hasfit_order=N.
- Parameters:
data (Union[TimeSeriesDataFrame, pd.DataFrame, Path, str], optional) –
dataset used for additional evaluation. Must include both historic and future data (i.e., length of all time series in
datamust be at leastprediction_length + 1).If
known_covariates_nameswere specified when creating the predictor,datamust include the columns listed inknown_covariates_nameswith the covariates values aligned with the target time series.If
train_dataused to train the predictor contained past covariates or static features, thendatamust also include them (with same column names and dtypes).If provided data is a path or a pandas.DataFrame, AutoGluon will attempt to automatically convert it to a
TimeSeriesDataFrame.display (bool, default = False) – If True, the leaderboard DataFrame will be printed.
use_cache (bool, default = True) – If True, will attempt to use the cached predictions. If False, cached predictions will be ignored. This argument is ignored if
cache_predictionswas set to False when creating theTimeSeriesPredictor.
- Returns:
leaderboard – The leaderboard containing information on all models and in order of best model to worst in terms of test performance.
- Return type:
pandas.DataFrame