INNER CODE UNIT · Python

diff_right

sdv-dev/Copulas · copulas/bivariate/__init__.py:164

    diff_right = [np.sum((empirical_right_aut - right) ** 2) for right in candidate_right_auts]
    diff_both = [np.sum((empirical_aut - candidate) ** 2) for candidate in candidate_auts]

    # calcule ranks
    score_left = pd.Series(diff_left).rank(ascending=False)
    score_right = pd.Series(diff_right).rank(ascending=False)
    score_both = pd.Series(diff_both).rank(ascending=False)

    score = score_left + score_right + score_both

    selected_copula = np.argmax(score.to_numpy())
    return copula_candidates[selected_copula]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…