A Career in Data Science — Part 3 — Machine Learning — Decision Trees

Fun Fact :

Decision Trees, its just as easy as it sounds. An intuition of this might really help you understand better :

Decision Trees can broadly be classified into :

Entropy :

© Brooke Lark, Unsplash
© Annie Spratt, Unsplash

I believe, you still have the 3 baskets of fruits I gave you. Let’s use that to cook up a formula for entropy :

First Basket — Apple, Apple, Apple, Apple

Second Basket — Apple, Apple, Apple, Orange

Third Basket — Apple, Apple, Orange, Orange

© Udacity

Now, we know what Entropy is and how it can be calculated. Together with this next concept, Information Gain, we should be able to understand Decision Trees in depth. Also, get to know how this algorithm can be represented as a Tree.

Information Gain :

# Now, If we split the data based on Gender, we get two sets :

# If we split the data based on Occupation, we get two sets :

This is our Decision Tree.

Enjoyed the article? Click the ❤ below to recommend it to other interested readers!

Data Driven Investor

from confusion to clarity, not insanity

Harris Mohammed

Written by

Data Science Engineer | Natural language processing

Data Driven Investor

from confusion to clarity, not insanity