Description
The function ml.KMeansModel.transform will call the parentModel.predict(features) method on each row which in turns will normalize all clusterCenters from mllib.KMeansModel.clusterCentersWithNorm every time!
This is a serious waste of resources! In my profiling, clusterCentersWithNorm represent 99% of the sampling!
This should have been implemented with a broadcast variable as it is done in other functions like computeCost.