plot_best_model
Module for analyzing and visualizing the single best performing model for each outcome.
Attributes
Classes
Initialize the plotter. |
Module Contents
- class plot_best_model.BestModelAnalyzerPlotter(data: pandas.DataFrame)[source]
Initialize the plotter.
- Parameters:
data – Aggregated results DataFrame. Must contain ‘outcome_variable’.
- feature_categories = ['age', 'sex', 'bmi', 'ethnicity', 'bloods', 'diagnostic_order', 'drug_order', 'annotation_n',...[source]
- plot_best_model_summary(metric: str = 'auc', outcomes_to_plot: List[str] | None = None, figsize: Tuple[int, int] = (14, 9))[source]
Generates a summary plot for the best model of each outcome.
This method finds the best performing model for each outcome and creates a detailed 2x2 plot summarizing its algorithm, performance, hyperparameters, and pipeline settings.
- Parameters:
metric (str, optional) – The metric to determine the “best” model. Defaults to ‘auc’.
outcomes_to_plot (Optional[List[str]], optional) – A specific list of outcomes to analyze. If None, analyzes all outcomes up to a limit. Defaults to None.
figsize (Tuple[int, int], optional) – The figure size for each summary plot. Defaults to (14, 9).