Gradient LabSign up free

ML glossary › Impurity

What is impurity in machine learning?

How mixed a group is. A group of only one class has impurity 0.

Where it shows up

Trees and ensembles

Entropy and Gini

A tree wants groups that are as “pure” as possible: all one answer. impurity measures how mixed a group is. All teal: impurity 0. Half and half: as mixed as it gets.

See impurity in motion. The lesson animates it step by step, free.

Open the lesson

Related terms