Comments (6)
The easiest solution to fix this is to replace the definition of Maze() from
random Cell Maze(Integer x,Integer y,Timestep t) ~
if t == @0 then
if x==0 & y==0 then
free
else
Categorical({free -> 0.6, wall -> 0.4})
else Maze(x,y,prev(t))
;
to
random Cell Maze(Integer x,Integer y) ~
if x==0 & y==0 then
free
else
Categorical({free -> 0.6, wall -> 0.4})
;
The difference is that in the previous case, Maze() is a temporal random variable while in the latter case, Maze() is a static variable.
In the current implementation of Particle Filtering, we will only contain the information for the last two timesteps. Note that some positions of Maze() might not be sampled in time 1, or time 2. So when you trace back from time 3, all the information in time 1 or time 0 has been deleted.
from blog.
thanks for the reply, but your proposed solution does not work: now it seems that the same maze cell is sampled at every step, even if it was already sampled.
Instead a cell has to be constant over time. Thus the maze cell at time t+1 has to be equal to the maze cell at time t.
from blog.
It actually works. You can try it. It produces the result of 0.25.
In particle filtering, all the random variables without an argument of timestep will be always reserved in every time step. They will not be cleared or resampled. In each time step you will have the same variable since they have nothing to do with timestep. That's why they are called static variables here. We are only removing temporal variables.
If you really want to make random var Maze() temporal variables, for now, the only way is to query it in each time step to ensure that it will be sampled before being removed.
from blog.
my mistake, I forgot to remove the time. thanks!
from blog.
It works, but if I want to query a cell maze at each step I get the same result. The maze belief should change according to the evidence, even when the maze is static. If I try to query several time e.g., maze(1,1) I get always the same result.
from blog.
It is true, always the same result.
If you query the static variable, the result is always the posterior distribution, namely the distribution given all the data (or saying, the posterior at the final timestep, always).
If you would like to observe how the posterior distribution varies, perhaps the only way is to firstly include a timestep argument in the definition of Maze() and then query all the necessary cells of Maze() at each timestep. In this case you will probably write dozens of queries. Yes, it is really a little bit annoying. We will try to come up with some new syntax for this.
from blog.
Related Issues (20)
- Create separate repo for birds and car model HOT 1
- Continuous integration HOT 7
- Support List Expression
- Problems with Matrix Indexing HOT 2
- Add slice() and size() functions for Matrix HOT 3
- Refactoring HOT 8
- Bugs in MHSampler HOT 3
- Bug 2 in MHSampler HOT 2
- add timing to ParticleFilter
- master regresssion test fail HOT 4
- comprehension_expr for Categorical distributions HOT 2
- bug in particle filter logic that forgets the past HOT 1
- Bug in rejection sampler? HOT 2
- syntax problem? HOT 1
- logarithmic time performance HOT 3
- DBLOG and backinstantiation HOT 4
- Examples in tutorial do not complete successfully HOT 4
- Use as a library HOT 3
- Fixed-lag smoothing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.