Mixture models using Dirichlet Processes in Javascript