Skip to content

Instantly share code, notes, and snippets.

@atoponce
Created July 5, 2019 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atoponce/c0e988023ac8cdebbec7d900f456a792 to your computer and use it in GitHub Desktop.
Save atoponce/c0e988023ac8cdebbec7d900f456a792 to your computer and use it in GitHub Desktop.
A = [0, 0, 0, 0, 1, 0, 0, 2, 0, 2, 1, 1, 1, 2, 0, 0, 2, 0, 1, 0, 1, 2, 1, 1, 0, 1, 2, 0, 3, 0, 2, 3, 0, 1, 1, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 1, 0, 1, 2, 3, 1, 1, 1, 1, 0, 1, 0, 2, 1, 0, 0, 0, 1, 1]
min-entropy: H = -log2(p_max)
Shannon: H = -sum(p_i * log2(p_i))
max-entropy: H = -log2(unique(p_i))
min-entropy ~= 4.196397212803504
Shannon ~= 5.158365849770286
max-entropy = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment