diff --git a/distribution_matching/tmp/understanding_divergence_montecarlo.py b/distribution_matching/tmp/understanding_divergence_montecarlo.py index 8276f59..afce141 100644 --- a/distribution_matching/tmp/understanding_divergence_montecarlo.py +++ b/distribution_matching/tmp/understanding_divergence_montecarlo.py @@ -71,7 +71,7 @@ def montecarlo_classweight(p, q, f=hd2, trials=TRIALS, epsilon=EPS): qs = q.pdf(xs)+epsilon N = trials n = q.n - return (1/(N*n))*np.sum(weights*f(ps/qs)) + return (1/(N))*np.sum(weights*f(ps/qs)) class Q: