From 037eefa688aa0289ceb802ab09fbef9795930be2 Mon Sep 17 00:00:00 2001 From: David-Elias Kuenstle Date: Fri, 20 Sep 2024 15:51:12 +0200 Subject: [PATCH] Change confidence_intervals to confidence_percentiles --- psignifit/_configuration.py | 2 +- psignifit/psignifit.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/psignifit/_configuration.py b/psignifit/_configuration.py index 7a5eb26..ff5a48e 100644 --- a/psignifit/_configuration.py +++ b/psignifit/_configuration.py @@ -37,7 +37,7 @@ class Configuration: """ beta_prior: int = 10 CI_method: str = 'project' - confidence_intervals: Tuple[float, float, float] = (.95, .9, .68) + confidence_percentiles: Tuple[float, float, float] = (.95, .9, .68) estimate_type: str = 'MAP' experiment_type: str = ExperimentType.YES_NO.value experiment_choices: Optional[int] = None diff --git a/psignifit/psignifit.py b/psignifit/psignifit.py index 41cd67b..42e2b58 100755 --- a/psignifit/psignifit.py +++ b/psignifit/psignifit.py @@ -91,7 +91,7 @@ def psignifit(data: np.ndarray, conf: Optional[Configuration] = None, grid_none_ix = tuple(ix for ix, (param, value) in enumerate(sorted(grid.items())) if value is None) grid_params = [param for param, value in grid.items() if value is not None] grid_values = [grid[param] for param in grid_params] - intervals = confidence_intervals(np.squeeze(posteriors, axis=grid_none_ix), grid_values, conf.confidence_intervals, conf.CI_method) + intervals = confidence_intervals(np.squeeze(posteriors, axis=grid_none_ix), grid_values, conf.confidence_percentiles, conf.CI_method) intervals_dict = {param: intervals[ix].tolist() for ix, param in enumerate(grid_params)} marginals = marginalize_posterior(grid, posteriors)