Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Three-Class Split Impurity

Evaluate Gini impurity and entropy of a node containing three class counts.

Statistics workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaGini = 1-(a**2+b**2+c**2)/(a+b+c)**2; Entropy = -(a*log2(a/(a+b+c))+b*log2(b/(a+b+c))+c*log2(c/(a+b+c)))/(a+b+c)
Sources and model references

Made for real tasks

  • Evaluate Gini impurity and entropy of a node containing three class counts.
Explore step-by-step workflows →

Worked example

Inputs

Class A count
20 count
Class B count
30 count
Class C count
50 count

Expected results

Gini
0.62 number
Entropy
1.485475297 bits

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter class a count, class b count, class c count.
  2. Use the displayed units and confirm the model assumptions.
  3. Calculate and compare the outputs against your input scenario.

Try this example

{
  "a": 20,
  "b": 30,
  "c": 50
}

Accuracy and scope

Three positive class counts; evaluates one node, not a tree split or a trained classifier.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.