Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Information request regarding particle attribute and predictive steps #60

Open
draktr opened this issue Jan 13, 2023 · 1 comment
Open

Comments

@draktr
Copy link

draktr commented Jan 13, 2023

  1. What is not clear in the documentation is whether the X attribute of that object is weighted or unweighted particles. If those are weighted, then I assume that the array in attribute W are the weights that are applied to importance-sampled particles to get X, correct?
  2. Is it possible to perform a predictive step for particle filtering with any of the algorithms in the library for sequential problems? I have tried it with next() methods for particles.SMC class objects, but that seems to be the regular update step similar to the one in SIR algorithm.
@nchopin
Copy link
Owner

nchopin commented Jan 14, 2023

  1. Attribute X is typically a numpy array of shape N or (N, d), which contains your N particles; these particles N particles are associated with N weights, which are stored in numpy array W (these weights are normalised to sum to one). At time t, you may compute the average
    np.average(phi(smc.X), weights=smc.W)
    to approximate the expectation of phi(X), relative to the current target distribution.
    Hope that answers your question.

  2. Depends what type of prediction you are looking for. A point estimate? The distribution of $Y_t$ given $Y_1,\ldots, Y_{t-1}$? (the $Y_t$ being the observed variables)? Samples from that distribution?
    There is nothing yet doing any of these things, but the 3rd one would be easy to implement, I can look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants