pydruglogics.model.Statistics module
- pydruglogics.statistics.Statistics.compare_two_simulations(boolean_models1: List, boolean_models2: List, observed_synergy_scores: List[str], model_outputs: Any, perturbations: Any, synergy_method: str = 'bliss', label1: str = 'Models 1', label2: str = 'Models 2', normalized: bool = True, plot: bool = True, save_result: bool = True) None
Compares ROC and PR curves for two sets of evolution results. By default, normalization of the first result is applied. :param boolean_models1: List of the best Boolean Models for the first simulation set. :param boolean_models2: List of the best Boolean Models for the second simulation set. :param observed_synergy_scores: List of observed synergy scores for comparison. :param model_outputs: Model outputs for evaluation. :param perturbations: List of perturbations to apply to the models. :param synergy_method: Method to check for synergy (‘hsa’ or ‘bliss’). :param label1: Label for the first simulation result. :param label2: Label for the second simulation result. :param normalized: Whether to normalize the first result. :param plot: Whether to display the ROC and PR curves. :param save_result: Whether to save the results. :return: None
- pydruglogics.statistics.Statistics.sampling_with_ci(boolean_models: List, observed_synergy_scores: List[str], model_outputs: Any, perturbations: Any, synergy_method: str = 'bliss', repeat_time: int = 10, sub_ratio: float = 0.8, boot_n: int = 1000, confidence_level: float = 0.9, plot: bool = True, plot_discrete: bool = False, save_result: bool = True, with_seeds: bool = True, seeds: int = 42) None
Performs sampling with confidence interval calculation and plot the PR curve. :param boolean_models: List of BooleanModel instances. :param observed_synergy_scores: List of observed synergy scores. :param model_outputs: Model outputs for evaluation. :param perturbations: List of perturbations to apply to the models. :param synergy_method: Method to check for synergy (‘hsa’ or ‘bliss’). :param repeat_time: Number of times to repeat sampling. :param sub_ratio: Proportion of models to sample in each iteration. :param boot_n: Number of bootstrap resampling iterations for confidence intervals. :param confidence_level: Confidence level for confidence interval calculations. :param plot: Whether to display the PR curve. :param plot_discrete: Whether to plot discrete points on the PR curve. :param save_result: Whether to save the results to a .tab file. :param with_seeds: Whether to use a fixed seed for reproducibility. :param seeds: Seed value for random number generation to ensure reproducibility. :return: None