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 on data, if provided. Computed according to eval_metric.

  • score_val: The validation score of the model using the internal validation data. Computed according to eval_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 set

  • fit_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 has fit_order=1, and the Nth model fit has fit_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 data must be at least prediction_length + 1).

    If known_covariates_names were specified when creating the predictor, data must include the columns listed in known_covariates_names with the covariates values aligned with the target time series.

    If train_data used to train the predictor contained past covariates or static features, then data must 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_predictions was set to False when creating the TimeSeriesPredictor.

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