def analyze(problem, X, Y, num_resamples=10,
            conf_level=0.95, print_to_console=False):

    D = problem['num_vars']
    N = Y.size

    if not 0 < conf_level < 1:
        raise RuntimeError("Confidence level must be between 0-1.")

    # equal frequency partition
    M = min(np.ceil(N ** (2 / (7 + np.tanh((1500 - N) / 500)))), 48)
    m = np.linspace(0, N, M + 1)
    Ygrid = np.linspace(np.min(Y), np.max(Y), 100)

    keys = ('delta', 'delta_conf', 'S1', 'S1_conf')
    S = dict((k, np.zeros(D)) for k in keys)
    if print_to_console:
        print("Parameter %s %s %s %s" % keys)

    for i in range(D):
        S['delta'][i], S['delta_conf'][i] = bias_reduced_delta(
            Y, Ygrid, X[:, i], m, num_resamples, conf_level)
        S['S1'][i] = sobol_first(Y, X[:, i], m)
        S['S1_conf'][i] = sobol_first_conf(
            Y, X[:, i], m, num_resamples, conf_level)
        if print_to_console:
            print("%s %f %f %f %f" % (problem['names'][i], S['delta'][
                  i], S['delta_conf'][i], S['S1'][i], S['S1_conf'][i]))

    return S

# Plischke et al. 2013 estimator (eqn 26) for d_hat
Perform Delta Moment-Independent Analysis on model outputs.
dataset/ETHPy150Open SALib/SALib/SALib/analyze/delta.py/analyze