Skip to content

Instantly share code, notes, and snippets.

View fpreiswerk's full-sized avatar

fpreiswerk

View GitHub Profile
@fpreiswerk
fpreiswerk / entropy_comparison.py
Created January 4, 2018 10:10
Code for post on Medium titled "Shannon entropy in the context of machine learning and AI"
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import numpy as np
import math
# disable divide by zero warnings
import warnings
warnings.filterwarnings("ignore")
SMALL_SIZE = 14