## Posts

Showing posts from 2013

### Basics of Integration using Monte Carlo

Recently, someone asked me about Monte Carlo. So, I thought I should write this post to provide a basic introduction of performing integration using Monte Carlo. "Why integration?", you asked. Well, this is because integration is one of the main operations done in computing the posterior probability distributions used in machine learning and probabilistic filtering (e.g. Bayes filter). For example, consider the typical posterior probability expression in the Bayes filtering context, $$p(x_{t} \mid y_{1:t})$$, i.e. the probability of hidden state $$x_{t}$$ given the observed sequence of measurements up to the current time point $$y_{1:t}$$, $$p(x_{t} \mid y_{1:t}) = \frac{p(y_{t} \mid x_{t}) p(x_{t} \mid y_{1:t-1})}{p(y_{t} \mid y_{1:t-1})}$$ The $$p(x_{t} \mid y_{1:t-1})$$ is of particular interest. It can be seen as the prediction of $$x_{t}$$ from previous observations $$y_{1:t-1}$$ and can be expressed as p(x_{t} \mid y_{1:t-1}) = \int p(x_{t} \mid x_{t-1}) p(x_{t-1}

### vmblock patch for linux 3.11-rc1 (vmware 9)

Linux 3.11-rc1 was released a few days ago. With it comes a kernel-level API change related to VFS . Specifically, struct file_operations no longer contains the function pointer readdir and vfs_readdir() which was defined in fs/readdir.c is now gone. They are both superseded by iterate and iterate_dir() respectively. Unfortunately, these changes broke the compilation of the vmblock fs module. So, here is a simple patch I've written for anyone who is interested. Note that you also have to apply the vmblock patch for linux 3.10 if you haven't already. Otherwise, the compilation would fail. Download: vmblock.3.11.patch diff --git a/linux/file.c b/linux/file.c index d7ac1f6..5499169 100644 --- a/linux/file.c +++ b/linux/file.c @@ -38,46 +38,6 @@ typedef u64 inode_num_t; typedef ino_t inode_num_t; #endif -/* Specifically for our filldir_t callback */ -typedef struct FilldirInfo { - filldir_t filldir; - void *dirent; -} FilldirInfo; - - -/* - *----------------------