c++

Parallel Monte Carlo: Simulating Compound Poisson Processes using C++ and TBB

Introduction In this post we implement a function to simulate random samples of a Compound Poisson variable. A random variable \(L\) is a compound Poisson (CP) random variable if there exists a Poisson random variable \(N\), and a random variable \(S\) such that

Expectation Maximization, Part 2: Fitting Regularized Probit Regression using EM in C++

Introduction In the first post in this series we discussed Expectation Maximization (EM) type algorithms. In the post prior to this one we discussed regularization and showed how it leads to a bias-variance trade off in OLS models.

Passing expressions and data from R to C++ before compile-time in Rmarkdown

Introduction In this post we give a simple illustrative example of how data generated by R code can be used by compiled languages such as C++ at compile time, instead of run-time, inside Rmarkdown.

Deriving Principal Component Analysis and implementing in C++ using Eigen

Introduction Principal component analysis is one of the most commonly used techniques in statistical modeling and machine learning. In typical applications it serves as a (linear) dimensionality reduction, allowing one to project high dimensional data onto a lower dimensional subspace.