Gain ratio calculator

Gain ratio calculator can be used for evaluating the quality of a feature in decision tree algorithms.

Input Parameters

Calculation Results

Calculation Formula

Gain Ratio = Split Information / Information Gain

Where:
Split Information is the entropy of the split.
Information Gain is the reduction in entropy due to the split.

Gain ratio calculator Calculator Usage Guide

Learn how to use the Gain ratio calculator calculator and its working principles

How to Use the Gain Ratio Calculator

  1. Enter the total number of instances in your dataset.
  2. Enter the number of instances belonging to class 0.
  3. Enter the number of instances belonging to class 1.
  4. Enter the split information for the attribute you are evaluating.
  5. Enter the information gain for the same attribute.
  6. Click the "Calculate" button to compute the gain ratio.
  7. The gain ratio will be displayed in the result field.

Working Principle

The gain ratio is a measure used in decision tree algorithms to evaluate the quality of a feature (or attribute) for splitting the data. It is a modification of the information gain that addresses the bias towards attributes with many values. The gain ratio is calculated as the ratio of the split information to the information gain.

Where:

  • Split Information is the entropy of the split.
  • Information Gain is the reduction in entropy due to the split.