- Help Center
- Machine Learning
- Supervised
-
Data Science Bootcamp
-
Large Language Models Bootcamp
-
Agentic AI Bootcamp
-
Registration
-
Pricing
-
Community
-
Python Programming
-
Platform Related Issues
-
Bootcamps
-
Homework and Notebooks
-
Free Courses
-
Data Science for Business
-
Practicum
-
Blog
-
Employment Assistance
-
Machine Learning
-
Data Analysis
-
R Language
-
Python for Data Science
-
SQL
-
Introduction to Power BI
-
Power BI
-
Programming and Tools
-
Partnerships
Which should be preferred among Gini impurity and Entropy?
Gini impurity and Information Gain Entropy are pretty much the same. And people do use the values interchangeably. Below are the formulae of both:
- Gini:Gini (E)=1−∑cj=1p2jGini:Gini(E)=1−∑j=1cpj2
- Entropy:H(E)=−∑cj=1pjlogpjEntropy:H(E)=−∑j=1cpjlogpj
Given a choice, I would use the Gini impurity, as it doesn't require me to compute logarithmic functions, which are computationally intensive. The closed-form of its solution can also be found.