@manishamde Sorry I misunderstood your proposal. I thought `Seq[Double]` contains the raw labels,  like
~~~
0 1 1 0 1 0 0 1
~~~
for classification and 
~~~
1.0 2.0 -3.0 5.0
~~~
for regression. You meant that `Seq[Double]` is `Seq(c0, c1)` for classification and `Seq(n, sum, sumSq)` for regression. I can see this would be a minor code change but it makes the interface more confusing, IMHO. If my understanding is correct, Impurity is applied to a sequence of labels. The code will have better separation if we use the following:
~~~
labels.foreach(impurityAccumulator.accumulate)
impurityAccumulator += anotherImpurityAccumulator
val impurity = impurityAccumulator.get
~~~
I think this is also a minor code change and it gives a cleaner public interface of `Impurity`. Maybe we can get some suggestions from others. @mateiz ?