plot_best_model =============== .. py:module:: plot_best_model .. autoapi-nested-parse:: Module for analyzing and visualizing the single best performing model for each outcome. Attributes ---------- .. autoapisummary:: plot_best_model.MAX_OUTCOMES_TO_PLOT Classes ------- .. autoapisummary:: plot_best_model.BestModelAnalyzerPlotter Module Contents --------------- .. py:data:: MAX_OUTCOMES_TO_PLOT :value: 10 .. py:class:: BestModelAnalyzerPlotter(data: pandas.DataFrame) Initialize the plotter. :param data: Aggregated results DataFrame. Must contain 'outcome_variable'. .. py:attribute:: data .. py:attribute:: clean_data .. py:attribute:: feature_categories :value: ['age', 'sex', 'bmi', 'ethnicity', 'bloods', 'diagnostic_order', 'drug_order', 'annotation_n',... .. py:attribute:: pipeline_params :value: ['resample', 'scale', 'param_space_size', 'percent_missing'] .. py:method:: plot_best_model_summary(metric: str = 'auc', outcomes_to_plot: Optional[List[str]] = None, figsize: Tuple[int, int] = (14, 9)) 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. :param metric: The metric to determine the "best" model. Defaults to 'auc'. :type metric: str, optional :param outcomes_to_plot: A specific list of outcomes to analyze. If None, analyzes all outcomes up to a limit. Defaults to None. :type outcomes_to_plot: Optional[List[str]], optional :param figsize: The figure size for each summary plot. Defaults to (14, 9). :type figsize: Tuple[int, int], optional