tabensemb.trainer.Trainer._cal_leaderboard#
method
- Trainer._cal_leaderboard(programs_predictions: Dict[str, Dict[str, Dict[str, Tuple[ndarray, ndarray]]]], metrics: List[str] | None = None, test_data_only: bool = False, save: bool = True) DataFrame[source]#
Calculate the leaderboard based on results from
cross_validation()ortabensemb.model.AbstractModel._predict_all().- Parameters:
- programs_predictions
Results from
cross_validation(), or assembled results fromtabensemb.model.AbstractModel._predict_all(). See the source code ofget_leaderboard()for details.- metrics
The metrics that have been implemented in
tabensemb.utils.utils.metric_sklearn().- test_data_only
Whether to evaluate models only on testing datasets.
- save
Whether to save the leaderboard locally and as an attribute in the
Trainer.
- Returns:
- pd.DataFrame
The leaderboard dataframe.