@mengxr I am not clear what you meant by the ```accumulate``` and ```get``` methods. 

There is no problem in encountering memory issues with ```calculate(Seq[Double])```. The length of the input sequence will be 2 for classification implementations (Gini, Entropy) and 3 for regression implementation (Variance). The ```calculate``` method is only used after the bin aggregation and subsequent bin aggregate to split aggregate conversions.  It's just a minor code change to have a single method signature in the ```Impurity``` trait.