Safety commit
Training with impurity measure is finished but untested.
Classification method is also done but untested.