forked from moreo/QuaPy
understanding importance sampling
This commit is contained in:
parent
61399d66f6
commit
ac88dc8961
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue