Information Gain Calculator
Calculate information gain, gain ratio, Gini gain, and feature importance for decision trees.
Inputs
Results
Information Gain
0.38 bits
Information Gain Ratio
0.391
Feature Importance
0.38
How to Use This Calculator
- Enter the class distribution of the parent node (e.g., 40 positive, 60 negative).
- Input the class distribution for each child node after splitting on a feature.
- Review the calculated entropy of the parent, entropy of each child, and information gain.
- Select the feature with the highest information gain for the next decision tree split.
- Use Gini impurity as an alternative splitting criterion for faster computation in large datasets.
How the result changes with Parent Entropy
| Parent Entropy | Information Gain | Information Gain Ratio | Feature Importance |
|---|---|---|---|
| 1 | 0.38 bits | 0.391 | 0.38 |
| 3.5 | 2.88 bits | 2.966 | 0.823 |
| 6.5 | 5.88 bits | 6.056 | 0.905 |
| 9 | 8.38 bits | 8.631 | 0.931 |
What each input means
- Parent Entropy
- Entropy of parent node
- Left Child Entropy
- Entropy of left child node
- Right Child Entropy
- Entropy of right child node
- Left Weight
- Proportion of samples in left child
- Right Weight
- Proportion of samples in right child
How this is calculated
Formula
IG = H(Parent) - Σ(Weight × H(Child))Worked example, using the default values
- Identify Input Parameters4 parametersParent Entropy = 1, Left Child Entropy = 0.5, Right Child Entropy = 0.8, Left Weight = 0.6 = 5 input(s) provided
- Calculate Information GainInformation Gain0.38 = 0.38
- Calculate Information Gain RatioInformation Gain Ratio0.391 = 0.391
- Calculate Feature ImportanceFeature Importance0.38 = 0.38
- Calculate Gini GainGini Gain-0.24 = -0.24
- Calculate Entropy ReductionEntropy Reduction38 = 38%
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Model Performance Metrics Calculator
Calculate accuracy, precision, recall, F1 score, MCC, AUC, and other classification performance metrics.
Machine Learning & AIGradient Descent Calculator
Calculate gradient descent parameters, convergence rate, effective learning rate, and training time estimates.
MLOps & AI CostingFeature Importance Calculator
Estimate how many features to keep, overfitting risk, and expected variance retention based on dataset size, model type, and correlation threshold.
Machine Learning & AIOverfitting Calculator
Calculate overfitting metrics, generalization gap, bias-variance trade-off, and model complexity analysis.
Data ScienceFeature Scaling Calculator
Scale raw feature values using min-max normalization, z-score standardization, robust scaling, and max-abs normalization for machine learning preprocessing.
More in Technology & Computing.