pod.plot_model_selection

plot_model_selection(cv_scores, used_key=None, cv_winner_key=None, cv_se=None)

Generates a normalized bar chart of the Bias-Variance Tradeoff from CV scores, alongside a sorted table of the exact MSE values in best-fit order.

Bars are colour-coded to distinguish the CV winner, the user-forced model (when different from the CV winner), and all other candidates. When the standard errors are given, the one-standard-error threshold used by select_cv_winner is drawn as a dashed line: the winner is the simplest model whose bar is below it.

Parameters

Name Type Description Default
cv_scores dict Dictionary mapping (model_type, params) tuples to their Cross-Validation MSE scores. required
used_key tuple | None The (type, params) key of the model that was actually used for the PoD calculation. If None, the bar with the lowest MSE is treated as the used model. None
cv_winner_key tuple | None The (type, params) key of the CV winner. If None, falls back to the bar with the lowest MSE. None
cv_se dict | None Standard error of each CV score (the models’ cv_se_ attribute). Optional. None