[algorithms] add variational bayes
[algorithms] save final number of components along with params