Suppose we have a joint distribution \(P\) on multiple random variables which we can’t sample from directly. But we require the samples anyhow. One way to sample from it is Gibbs sampling. Where we know that sampling from \(P\) is hard, but sampling from the conditional distribution of one variable...
[Read More]
KL Divergence between 2 Gaussian Distributions
What is the KL (Kullback–Leibler) divergence between two multivariate Gaussian distributions?
[Read More]
Burrows-Wheeler Alignment Part 2
In part 1 of this tutorial we looked at how we can solve the read alignment problem using Burrows-Wheeler transform. In this post, we will continue exploring this algorithm and see how we can do read alignment with mismatches allowed.
[Read More]
Burrows-Wheeler Alignment Part 1
Consider the following problem of read alignment. You are given millions of small pieces of DNA sequence, called reads and one large DNA sequence called the reference sequence (DNA sequences contain only 4 letters A, C, G, T representing the four bases). You have to find how many of those...
[Read More]
Burrows-Wheeler Transform
Burrows-Wheeler transform (or, BWT) is a block compression algorithm and is used in programs like bzip. The output of the algorithm is a string which contains chunks of same characters which can be easily stored in a compact form. The compression is lossless, that is, we can get back the...
[Read More]
Programming Gale-Shapley Algorithm in C++
We will be writing program for Gale-Shapley Algorithm in C++. This algorithm is used to solve the Stable Marriage Problem.
You can get the problem on SPOJ,
or on codechef.
You can understand the algorithm from Gale-Shapley’s paper: College Admissions and the Stability of Marriage
[Read More]
Creating Spritesheet Animation in HTML5 canvas using Javascript
In this article, I am going to tell you how to create spritesheet animations in HTML5 canvas using javascript. You can use these for creating animations in your HTML5 game. I will be using javascript(as the title says), but you can use this concept in other canvas, like canvas in...
[Read More]