Imọ Itọsọna
Gini Impurity
Gini impurity measures how mixed the class labels are in a decision-tree node, with zero indicating that every example belongs to one class.
Lori iwe yi4 min ka
Akopọ
CART classifiers use the expected impurity reduction from candidate splits to choose partitions, but the score is a local split criterion rather than a complete measure of model quality.
Jin Dive
Decision-tree classifiers recursively divide data into regions. At each candidate split, the tree needs a criterion for how well the resulting child nodes separate class labels. Gini impurity for a node is 1 minus the sum of squared class proportions. For classes with proportions p_k, G = 1 - sum(p_k squared). A pure node has one proportion equal to one and all others zero, so G is zero. In a binary node with balanced proportions 0.5 and 0.5, G is 0.5, the maximum for two classes. For a hypothetical node with 8 positive and 2 negative cases, proportions are 0.8 and 0.2. The calculation is 1 - (0.64 + 0.04) = 0.32. This score can be interpreted as the probability of misclassification if a label is assigned by randomly drawing according to the node's class proportions, though a trained tree normally predicts the majority class. CART evaluates candidate splits by the weighted average impurity in the children, weighting each by its share of the parent observations. The impurity decrease is parent impurity minus this weighted child impurity. Thus an empty-looking or very small child does not automatically make a split useful. Tree constraints such as minimum leaf size, depth and pruning also affect the final model. Gini is computationally convenient because it avoids logarithms, while entropy uses -sum(p log p) and may rank candidate splits similarly but not necessarily identically. Gini impurity is not the same as the dataset's overall class imbalance, a probability that the model's prediction is wrong, or an evaluation score on held-out data. It is calculated locally at a node from labels present there. A tree can achieve pure training leaves by growing deeply and still generalize poorly. Evaluate the full model with an appropriate split, and inspect class-specific errors, calibration where needed and stability. The impurity criterion guides construction; it does not establish whether features are causal or predictions useful.
Ipa Ilana
Iye owo ati isuna
Awọn ipinnu faaji ṣe awakọ iṣẹ ati idiyele iṣẹ fun awọn ọdun.
Awọn ipinnu diẹ sii
Ẹkọ imọ-ẹrọ ṣe iranlọwọ fun awọn ẹgbẹ lati yan akopọ to tọ, kii ṣe ọkan tuntun nikan.
Iṣakoso didara
Awọn yiyan imọ-ẹrọ to dara julọ dinku awọn iṣẹlẹ igbẹkẹle ni iṣelọpọ.
The Future of Gini Impurity
Tree explanations can make split criteria more useful by showing parent class proportions, child proportions and weighted impurity change together. Teams should also review leaf sizes and held-out class performance so an apparently clean training partition does not dominate judgments. When class imbalance matters, evaluate minority-class outcomes alongside impurity reductions. A practical process documents the criterion, pruning choices and validation design, then revisits them when the population or label process changes. Better visualization can clarify why a split was chosen, but the criterion remains one part of model assessment rather than a quality certificate.
Real-World imuse
A node contains 8 positive and 2 negative cases. Its Gini impurity is 1 - (0.8 squared + 0.2 squared) = 0.32, representing the chance of a different label if two labels are drawn independently from its class proportions.
A hypothetical split creates one pure child and one mixed child. The parent impurity must be compared with the child impurities weighted by their sample proportions; a tiny pure child alone does not establish a good split.
A team compares a tree using Gini with one using entropy, then evaluates held-out predictions. Similar split choices do not guarantee identical trees or equal generalization.
A node has class proportions 0.5 and 0.5, yielding impurity 0.5 in the binary case. A node with 0.9 and 0.1 has impurity 0.18 and is more class-concentrated.
Awọn ewu & Awọn ọna iṣọ
Ṣiṣepe ala-ilẹ kan le tọju awọn ailagbara eto ti o gbooro.
Awọn ohun elo amayederun ati awọn idiyele itọju nigbagbogbo ni aibikita.
Aabo ati awọn ela akiyesi le dagba bi awọn eto ṣe di eka sii.
Ilana Ilana imuse
Ṣetumo lairi, didara, ati awọn ibi-afẹde idiyele ṣaaju imuse.
Aṣepari labẹ ẹru ojulowo ati awọn ipo data.
Abojuto ohun elo fun awọn aṣiṣe, fiseete, ati ipa olumulo.
Mura ipadasẹhin pada ati awọn ipa ọna esi iṣẹlẹ ṣaaju iwọn.
Tesiwaju Ṣiṣawari
Free newsletter
Get the daily AI briefing
Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.
One email each weekday. Unsubscribe in one click. We never sell or share your address.
Test yourself
Take the Gini Impurity quiz
Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.
Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation
Awọn ibeere ti a beere nigbagbogbo
What is Gini Impurity?
Gini impurity measures how mixed the class labels are in a decision-tree node, with zero indicating that every example belongs to one class. CART classifiers use the expected impurity reduction from candidate splits to choose partitions, but the score is a local split criterion rather than a complete measure of model quality.
A binary node has class proportions 0.8 and 0.2. What is its Gini impurity?
One minus (0.8 squared plus 0.2 squared) equals 1 - 0.68 = 0.32.
Which value describes impurity in a node containing only one class?
A pure node has one class proportion of one, so one minus the sum of squared proportions is zero.
How should child impurities be combined when evaluating a candidate split?
The split criterion uses a sample-size-weighted average of child impurities.
What does a Gini decrease represent in tree construction?
The split gain is the parent's impurity minus the weighted average impurity after splitting.
Which distinction between Gini and entropy is accurate?
Both measure class mixing for split selection, but their formulas and numerical scales differ.
Tesiwaju kikọ
Jẹmọ awọn itọsọna
Awọn itọsọna diẹ sii ti a yan fun koko yii