Skip to content

How to calculate the weight of the particle i #8

Open
@Rickyan

Description

@Rickyan

Hello!
How to calculate the weight of the particle i ?
in your code, the mean of the kernel is particle i, but I saw another code that the mean of the kernel is particle_perv j. I'm confused.
https://github.com/rcmorehead/simpleabc/blob/master/simple_abc.py

code1:
# apply kernel to each particle's parameter vector Kf = self.kernel(Pid,t) kernels = Kf(self.theta[t-1])

code2:
for j in xrange(theta_prev.shape[1]): norm[j] = stats.multivariate_normal.pdf(theta[:, i], mean=theta_prev[:, j], cov=tau_squared)
I checked out the paper of Tina Toni 2009, and I think code2 maybe right, and the kernel is a transition kernel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions