I learned very early the difference between knowing the name of something and knowing something.

Richard Feynman

Programming

Simulating Geometric Brownian Motion

I work through a simple Python bvimplementation of geometric Brownian motion and check it against the theoretical model.

Scaling Factors for Hidden Markov Models

Inference for hidden Markov models (HMMs) is numerically unstable. A standard approach to resolving this instability is to use scaling factors. I discuss this idea in detail.

A Python Implementation of the Multivariate Skew Normal

I needed a Python implementation of the multivariate skew normal. I wrote one based on SciPy's multivariate distributions module.

Fast Computation of the Multivariate Normal PDF for Multiple Parameters

For a project, I needed to compute the log PDF of a vector for multiple pairs of mean and variance parameters. I discuss a fast Python implementation.

A Python Demonstration that Mutual Information Is Symmetric

I provide a numerical demonstration that the mutual information of two random variables, the observations and latent variables in a Gaussian mixture model, is symmetric.

The Log-Sum-Exp Trick

Normalizing vectors of log probabilities is a common task in statistical modeling, but it can result in under- or overflow when exponentiating large values. I discuss the log-sum-exp trick for resolving this issue.

A Python Implementation of the Multivariate t-distribution

I needed a fast and numerically stable Python implementation of the multivariate t-distribution. I wrote one based on SciPy's multivariate distributions module.

A Fast and Numerically Stable Implementation of the Multivariate Normal PDF

Naively computing the probability density function for the multivariate normal can be slow and numerically unstable. I work through SciPy's implementation.

A Practical Implementation of Gaussian Process Regression

I discuss Rasmussen and Williams's Algorithm 2.1 for an efficient implementation of Gaussian process regression.

Floating Point Precision with Log Likelihoods

Computing the log likelihood is a common task in probabilistic machine learning, but it can easily under- or overflow. I discuss one such issue and its resolution.