Add method for calculating information gain