(elementary_effects: np.ndarray, num_vars: int,
                                num_resamples: int,
                                conf_level: float)
return mu_star_conf
Computes the confidence intervals for the mu_star variable.

    Uses bootstrapping where the elementary effects are resampled with
    replacement to produce a histogram of resampled mu_star metrics.
    This resample is used to produce a confidence interval.

    Parameters
    ----------
    elementary_effects : np.array
        Elementary effects for each parameter
    num_vars: int
        Number of problem's variables
    num_resamples: int
        Number of resamples
    conf_level: float
        Confidence level

    Returns
    -------
    mu_star_conf: np.ndarray
        Confidence intervals for the mu_star variable
Computes the confidence intervals for the mu_star variable.
Computes the confidence intervals for the mu_star variable .
def _compute_mu_star_confidence(elementary_effects: np.ndarray, num_vars: int,
                                num_resamples: int,
                                conf_level: float) -> np.ndarray:
    """Computes the confidence intervals for the mu_star variable.

    Uses bootstrapping where the elementary effects are resampled with
    replacement to produce a histogram of resampled mu_star metrics.
    This resample is used to produce a confidence interval.

    Parameters
    ----------
    elementary_effects : np.array
        Elementary effects for each parameter
    num_vars: int
        Number of problem's variables
    num_resamples: int
        Number of resamples
    conf_level: float
        Confidence level

    Returns
    -------
    mu_star_conf: np.ndarray
        Confidence intervals for the mu_star variable
    """
    if not 0 < conf_level < 1:
        raise ValueError("Confidence level must be between 0-1.")

    mu_star_conf = []
    for j in range(num_vars):
        ee = elementary_effects[j, :]
        resample_index = np.random.randint(len(ee),
                                           size=(num_resamples, len(ee)))
        ee_resampled = ee[resample_index]

        # Compute average of the absolute values over each of the resamples
        mu_star_resampled = np.average(np.abs(ee_resampled), axis=1)

        mu_star_conf.append(norm.ppf(0.5 + conf_level / 2)
                            * mu_star_resampled.std(ddof=1))

    mu_star_conf = np.asarray(mu_star_conf)

    return mu_star_conf
def _compute_mu_star_confidence ( elementary_effects : np . ndarray , num_vars : int , num_resamples : int , conf_level : float ) -> np . ndarray : if not 0 < conf_level < 1 : raise ValueError ( "Confidence level must be between 0-1." ) mu_star_conf = [ ] for j in range ( num_vars ) : ee = elementary_effects [ j , : ] resample_index = np . random . randint ( len ( ee ) , size = ( num_resamples , len ( ee ) ) ) ee_resampled = ee [ resample_index ] # Compute average of the absolute values over each of the resamples mu_star_resampled = np . average ( np . abs ( ee_resampled ) , axis = 1 ) mu_star_conf . append ( norm . ppf ( 0.5 + conf_level / 2 ) * mu_star_resampled . std ( ddof = 1 ) ) mu_star_conf = np . asarray ( mu_star_conf ) return mu_star_conf