Created
May 2, 2016 16:03
-
-
Save fonnesbeck/f4a6c1ad97477d20c491ab2199a94b0b to your computer and use it in GitHub Desktop.
One hot encoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hot_one_state(index): | |
array = np.zeros(NUM_STATES) | |
array[index] = 1. | |
return array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment