plaid.post.bisect ================= .. py:module:: plaid.post.bisect .. autoapi-nested-parse:: Utiliy function to plot bisect graphs comparing predictions vs. targets dataset. Functions --------- .. autoapisummary:: plaid.post.bisect.prepare_datasets plaid.post.bisect.is_dvipng_available plaid.post.bisect.plot_bisect Module Contents --------------- .. py:function:: prepare_datasets(ref_dataset: plaid.Dataset, pred_dataset: plaid.Dataset, problem_definition: plaid.ProblemDefinition, verbose: bool = False) -> tuple[dict, dict, list[str]] Prepare datasets for comparison. :param ref_dataset: The reference dataset. :type ref_dataset: Dataset :param pred_dataset: The predicted dataset. :type pred_dataset: Dataset :param problem_definition: The common problem for the reference and predicted dataset :type problem_definition: ProblemDefinition :param verbose: Verbose mode. Defaults to False. :type verbose: bool, optional :returns: A tuple containing dictionaries of reference and predicted scalar values, and a list of scalar names. :rtype: tuple[dict[str, list[float]], dict[str, list[float]], list[str]] .. py:function:: is_dvipng_available(verbose: bool) -> bool Check if dvipng is available on the system for matplotlib figures. :returns: True if dvipng is available, False otherwise. :rtype: bool .. py:function:: plot_bisect(ref_dataset: Union[plaid.Dataset, str, pathlib.Path], pred_dataset: Union[plaid.Dataset, str, pathlib.Path], problem_def: Union[plaid.ProblemDefinition, str, pathlib.Path], scalar: Union[str, int], save_file_name: str = 'bissec_plots', verbose: bool = False) -> None Plot a bisect graph comparing predictions vs. targets dataset. :param ref_dataset: The reference dataset or its file path. :type ref_dataset: Dataset | str | Path :param pred_dataset: The predicted dataset or its file path. :type pred_dataset: Dataset | str | Path :param problem_def: The common problem for the reference and predicted dataset :type problem_def: ProblemDefinition | str | Path :param scalar: The name of the scalar to study or its index. :type scalar: str | int :param save_file_name: Figure name when saving to PNG format. Defaults to "bissec_plots". :type save_file_name: str, optional :param verbose: Verbose mode. Defaults to False. :type verbose: bool, optional :raises KeyError: If the provided scalar name is not part of the dataset.