Machine Learning, Entropy, Information Theory, Python.
node_impurity(event1, event2 ): e1=entropy(list(event1)) e2=entropy(list(event2)) ln_event1=len(list(event1)) ln_event2=len(list(event2)) return (e1*ln_event1+e2*ln_event2)/df.shape[0]Step 1: We will start by constructing our root node. Root node is the explainatory variables that best seperates