Blog Archives

Compile R and OpenBLAS from Source Guide

Compile R and OpenBLAS from Source Guide

1. Get OpenBLAS 2.1 Get R 2.2 Specific Instructions for DSS Users 3. Validation 4. Benchmark This guide is intended to aid any R and Linux user who desires a threaded version of BLAS. In particular I hope this will allow other grad students, who like me do not have many user privileges on their […] The post Compile R and OpenBLAS from Source Guide appeared first on Lindons Log.

Read more »

Monotonicity of EM Algorithm Proof

April 19, 2014
By

Here the monotonicity of the EM algorithm is established. $$ f_{o}(Y_{o}|\theta)=f_{o,m}(Y_{o},Y_{m}|\theta)/f_{m|o}(Y_{m}|Y_{o},\theta)$$ $$ \log L_{o}(\theta)=\log L_{o,m}(\theta)-\log f_{m|o}(Y_{m}|Y_{o},\theta) \label{eq:loglikelihood} $$ where \( L_{o}(\theta)\) is the likelihood under the observed data and \(L_{o,m}(\theta)\) is the likelihood under the complete data. Taking the expectation of the second line with respect to the conditional distribution of \(Y_{m}\) given \(Y_{o}\) and […] The post Monotonicity of EM Algorithm Proof appeared first on Lindons Log.

Read more »

C++11 versus R Standalone Random Number Generation Performance Comparison

If you are writing some C++ code with the intent of calling it from R or even developing it into a package you might wonder whether it is better to use the pseudo random number library native to C++11 or the R standalone library. On the one hand users of your package might have an […] The post C++11 versus R Standalone Random Number Generation Performance Comparison appeared first on…

Read more »

Stochastic Optimization in R by Parallel Tempering

October 12, 2013
By
Stochastic Optimization in R by Parallel Tempering

I’ve written a few posts now about using parallel tempering to sample from complicated multi-modal target distributions but there are also other benefits and uses to this algorithm. There is a nice post on Darren Wilkinson’s blog about using tempered posteriors for marginal likelihood calculations. There is also another area where parallel tempering finds application, […] The post Stochastic Optimization in R by Parallel Tempering appeared first on Lindons Log.

Read more »

Parallel Tempering in R with Rmpi

October 7, 2013
By
Parallel Tempering in R with Rmpi

My office computer recently got a really nice upgrade and now I have 8 cores on my desktop to play with. I also at the same time received some code for a Gibbs sampler written in R from my adviser. I wanted to try a metropolis-coupled markov chain monte carlo, , algorithm on it to […] The post Parallel Tempering in R with Rmpi appeared first on Lindons Log.

Read more »

Easy 3-Minute Guide to Making apply() Parallel over Distributed Grids and Clusters in R

September 2, 2013
By
Easy 3-Minute Guide to Making apply() Parallel over Distributed Grids and Clusters in R

Last week I attended a workshop on how to run highly parallel distributed jobs on the Open Science Grid (osg). There I met Derek Weitzel who has made an excellent contribution to advancing R as a high performance computing language by developing BoscoR. BoscoR greatly facilitates the use of the already existing package “GridR” by […] The post Easy 3-Minute Guide to Making apply() Parallel over Distributed Grids and Clusters…

Read more »

Model Scale Parameterization for MCMC Efficiency

August 1, 2013
By
Model Scale Parameterization for MCMC Efficiency

I recently came across a very interesting paper by Y. Yu and X. Meng[1] who present an interweaving strategy between different model parameterizations to improve mixing. It is well known that different model parameterizations can perform better than others under certain conditions. Papaspiliopoulos, Roberts and Sköld [2] present a general framework for how to parameterize […] The post Model Scale Parameterization for MCMC Efficiency appeared first on Lindons Log.

Read more »

Woodbury Matrix Inverse Identity

Woodbury Matrix Inverse Identity

Application in Conditional Distribution of Multivariate Normal The Sherman-Woodbury-Morrison matrix inverse identity can be regarded as a transform between Schur complements. That is, given one can obtain by using the Woodbury matrix identity and vice versa. Recall the Woodbury Identity: and I recently stumbled across a neat application of this whilst deriving full conditionals for […] The post Woodbury Matrix Inverse Identity appeared first on Lindons Log.

Read more »

Parallel Tempering Algorithm with OpenMP / C++

Parallel Tempering Algorithm with OpenMP / C++

1.1. Parallel Tempering Theory 1.2. Physics Origins 2.1 Intra-Thread Metropolis Move 2.2. Inter-Thread Parallel Tempering 2.3. OpenMP Parallelization 3. Full Code 4. Simulation Study 5. On the Future use of Parallel Tempering with OpenMP Parallel tempering is one of my favourite sampling algorithms to improve MCMC mixing times. This algorithm seems to be used exclusively […] The post Parallel Tempering Algorithm with OpenMP / C++ appeared first on Lindons Log.

Read more »

Model Selection in Bayesian Linear Regression

Model Selection in Bayesian Linear Regression

Previously I wrote about performing polynomial regression and also about calculating marginal likelihoods. The data in the former and the calculations of the latter will be used here to exemplify model selection. Consider data generated by and suppose we wish to fit a polynomial of degree 3 to the data. There are then 4 regression […] The post Model Selection in Bayesian Linear Regression appeared first on Lindons Log.

Read more »


Subscribe

Email:

  Subscribe