<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Juho Kokkala's blog</title><link>http://www.juhokokkala.fi/blog/</link><description></description><atom:link rel="self" href="http://www.juhokokkala.fi/blog/rss.xml" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sat, 03 Jun 2017 14:43:08 GMT</lastBuildDate><generator>https://getnikola.com/</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Correction: evaluation of Matérn 3/2 GP density in Stan using the SDE representation takes quadratic time!</title><link>http://www.juhokokkala.fi/blog/posts/correction-the-evaluation-of-matern-32-gp-density-takes-quadratic-time/</link><dc:creator>Juho Kokkala</dc:creator><description>&lt;div&gt;&lt;p&gt;Summary: The method proposed in &lt;a class="reference external" href="http://www.juhokokkala.fi/blog/posts/linear-time-evaluation-of-matern-32-gp-density-in-stan-using-the-sde-representation/"&gt;http://www.juhokokkala.fi/blog/posts/linear-time-evaluation-of-matern-32-gp-density-in-stan-using-the-sde-representation/&lt;/a&gt; has quadratic time complexity (per evaluation of density+gradient) due to the gradient evaluation. This explains why the speedup seen in the experiment was only proportional to the number of input points (consistent with the difference between cubic and quadratic time complexity), not to the square of the number of input points as I expected. NB: I have not examined the code Stan produces, the possibility remains that the time-complexity is even higher due to something I have missed...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.juhokokkala.fi/blog/posts/correction-the-evaluation-of-matern-32-gp-density-takes-quadratic-time/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>bayes</category><category>corrections</category><category>gaussian-process</category><category>kalman-filter</category><category>mathjax</category><category>sde</category><category>stan</category><guid>http://www.juhokokkala.fi/blog/posts/correction-the-evaluation-of-matern-32-gp-density-takes-quadratic-time/</guid><pubDate>Sat, 03 Jun 2017 14:42:00 GMT</pubDate></item><item><title>Rao-Blackwellized particle filters for quasiperiodic Gaussian processes</title><link>http://www.juhokokkala.fi/blog/posts/rao-blackwellized-particle-filters-for-quasiperiodic-gaussian-processes/</link><dc:creator>Juho Kokkala</dc:creator><description>&lt;div&gt;&lt;p&gt;Summary: Notes about implementation of a Rao-Blackwellized particle filter for approximate inference with quasiperiodic Gaussian processes and a Poisson observation model. This kind of model could be applied, for example, to predict the number customers arriving at specific time intervals, when the arrival intensity is time-varying and has daily, weekly etc. seasonality. Python implementation and an experiment with artificial data are available in an &lt;a class="reference external" href="http://github.com/juhokokkala/rbpf_qpgp"&gt;accompanying GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.juhokokkala.fi/blog/posts/rao-blackwellized-particle-filters-for-quasiperiodic-gaussian-processes/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>bayes</category><category>gaussian-process</category><category>GPy</category><category>kalman-filter</category><category>mathjax</category><category>particle-filter</category><guid>http://www.juhokokkala.fi/blog/posts/rao-blackwellized-particle-filters-for-quasiperiodic-gaussian-processes/</guid><pubDate>Wed, 31 Aug 2016 09:48:00 GMT</pubDate></item><item><title>Linear time evaluation of Matérn 3/2 GP density in Stan using the SDE representation (NB: See the correction!)</title><link>http://www.juhokokkala.fi/blog/posts/linear-time-evaluation-of-matern-32-gp-density-in-stan-using-the-sde-representation/</link><dc:creator>Juho Kokkala</dc:creator><description>&lt;div&gt;&lt;p&gt;CORRECTION 2017-06-03: The gradient evaluation here has quadratic time complexity &lt;a class="reference external" href="http://www.juhokokkala.fi/blog/posts/correction-the-evaluation-of-matern-32-gp-density-takes-quadratic-time/"&gt;as explained here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Summary: Technical stuff about speeding up Bayesian inference performed with &lt;a class="reference external" href="http://mc-stan.org"&gt;Stan&lt;/a&gt;, for a model with a one-dimensional latent process modeled by a Matérn 3/2 Gaussian process and a non-Gaussian likelihood (here, Poisson). The idea is that the contribution of the GP to the target density may be evaluated in linear time (w.r.t the number of observations) as opposed to the cubic time complexity of the approach based on inverting covariance matrices. (Caveat: I do not know what Stan's automatic differentation does but I expect that the time complexities are the same for the gradients. Let me know if this is false). The idea here is somewhat similar to the previous post, with the difference that this time the 'speedup' does not involve marginalizing any variables out. Instead, it only helps with a faster evaluation of exactly the same log-density (ignoring different floating-point errors). The speedup is demonstrated in an experiment, but seems to be only proportional to the number of input points (rather than to the square as one would expect based on the asymptotic complexities of only evaluating the GP density).  Complete Stan codes are in an &lt;a class="reference external" href="http://github.com/juhokokkala/matern32-poisson-sde-stan"&gt;accompanying GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.juhokokkala.fi/blog/posts/linear-time-evaluation-of-matern-32-gp-density-in-stan-using-the-sde-representation/"&gt;Read more…&lt;/a&gt; (18 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>bayes</category><category>gaussian-process</category><category>kalman-filter</category><category>mathjax</category><category>sde</category><category>stan</category><guid>http://www.juhokokkala.fi/blog/posts/linear-time-evaluation-of-matern-32-gp-density-in-stan-using-the-sde-representation/</guid><pubDate>Sat, 13 Aug 2016 17:04:00 GMT</pubDate></item><item><title>Kalman filter style recursion to marginalize state variables to speed up Stan inference</title><link>http://www.juhokokkala.fi/blog/posts/kalman-filter-style-recursion-to-marginalize-state-variables-to-speed-up-stan-inference/</link><dc:creator>Juho Kokkala</dc:creator><description>&lt;div&gt;&lt;p&gt;Summary: Technical stuff about speeding up Bayesian inference performed with &lt;a class="reference external" href="http://mc-stan.org"&gt;Stan&lt;/a&gt;, for a certain random-walk model that contains a conditionally linear-Gaussian state-space model. The basic idea is that we can write a Kalman-filter style loop within the Stan code so that the log-posterior evaluated is one where the state variables are marginalized out. The HMC sampler then needs to move only in the space of the parameters. Complete Stan codes are in the accompanying &lt;a class="reference external" href="https://github.com/juhokokkala/kalman-stan-randomwalk"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.juhokokkala.fi/blog/posts/kalman-filter-style-recursion-to-marginalize-state-variables-to-speed-up-stan-inference/"&gt;Read more…&lt;/a&gt; (7 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>bayes</category><category>kalman-filter</category><category>mathjax</category><category>stan</category><guid>http://www.juhokokkala.fi/blog/posts/kalman-filter-style-recursion-to-marginalize-state-variables-to-speed-up-stan-inference/</guid><pubDate>Mon, 08 Aug 2016 15:15:00 GMT</pubDate></item><item><title>Hello, World!</title><link>http://www.juhokokkala.fi/blog/posts/hello-world/</link><dc:creator>Juho Kokkala</dc:creator><description>&lt;p&gt;This is a test post.&lt;/p&gt;</description><guid>http://www.juhokokkala.fi/blog/posts/hello-world/</guid><pubDate>Mon, 08 Aug 2016 08:29:00 GMT</pubDate></item></channel></rss>