fixing performance issues in NB, k-means and SVM
Merge branch 'optiml-perf-improvements'