This is a simple version of the expectation maximization algorithm in Java