Skip to content

Instantly share code, notes, and snippets.

View Zakenmaru's full-sized avatar

Zakenmaru

View GitHub Profile
@iamaziz
iamaziz / entropy_gain.py
Last active November 14, 2023 02:41
Calculate Entropy and Information Gain for Decision Tree Learning
# -*- coding: utf-8 -*-
# calculating the Entropy and Information Gain for: Learning with Trees
# by: Aziz Alto
# see Information Gain:
# http://www.autonlab.org/tutorials/infogain.html
from __future__ import division