(base, perturbed, x_delta, bounds, num_resamples, conf_level)
return dgsm, norm.ppf(0.5 + conf_level / 2.0) * s.std(ddof=1)
v_i sensitivity measure following Sobol and Kucherenko (2009).
    For comparison, total order S_tot <= dgsm
v_i sensitivity measure following Sobol and Kucherenko (2009).
    For comparison, total order S_tot <= dgsm
v_i sensitivity measure following Sobol and Kucherenko ( 2009 ) . For comparison total order S_tot < = dgsm
def calc_dgsm(base, perturbed, x_delta, bounds, num_resamples, conf_level):
    """v_i sensitivity measure following Sobol and Kucherenko (2009).
    For comparison, total order S_tot <= dgsm
    """
    D = np.var(base)
    vi = calc_vi_mean(base, perturbed, x_delta)
    dgsm = vi * (bounds[1] - bounds[0])**2 / (D * np.pi**2)

    len_base = len(base)
    s = np.empty(num_resamples)
    r = np.random.randint(len_base, size=(num_resamples, len_base))
    for i in range(num_resamples):
        r_i = r[i]
        s[i] = calc_vi_mean(base[r_i], perturbed[r_i], x_delta[r_i])

    return dgsm, norm.ppf(0.5 + conf_level / 2.0) * s.std(ddof=1)
def calc_dgsm ( base , perturbed , x_delta , bounds , num_resamples , conf_level ) : D = np . var ( base ) vi = calc_vi_mean ( base , perturbed , x_delta ) dgsm = vi * ( bounds [ 1 ] - bounds [ 0 ] ) ** 2 / ( D * np . pi ** 2 ) len_base = len ( base ) s = np . empty ( num_resamples ) r = np . random . randint ( len_base , size = ( num_resamples , len_base ) ) for i in range ( num_resamples ) : r_i = r [ i ] s [ i ] = calc_vi_mean ( base [ r_i ] , perturbed [ r_i ] , x_delta [ r_i ] ) return dgsm , norm . ppf ( 0.5 + conf_level / 2.0 ) * s . std ( ddof = 1 )