anum bse
anum bse

Reputation: 1

calculating entropy and information gain python

I'm a beginner in python trying to calculate entropy and information gain without using any libraries. Calculation results matter more than code quality right now.

I have the data frame and want to make lists of attribute count like this

Outlook = [
    [4, 0],  # overcast
    [2, 3],  # sunny
    [3, 2]   # rain
]
temperature = [
    [2, 2],  # hot
    [3, 1],  # cool
    [4, 2]   # mild
]

This is my data : play golf data set

Upvotes: 0

Views: 972

Answers (0)

Related Questions