Created
May 19, 2019 10:18
-
-
Save gaganmanku96/bac3f09f4a418ec29f9a0a05cc318747 to your computer and use it in GitHub Desktop.
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
rating = [] | |
df = pd.read_csv('..') | |
rating = df['target'].values | |
del df | |
''' | |
These values are determined by len of your dataset. If you have 25k as length then you can use 20k for training and 5k for testing. | |
''' | |
train_arrays = np.ones((20000, 250)) | |
train_labels = np.ones(20000,dtype='int') | |
test_arrays = np.zeros((5000, 250)) | |
test_labels = np.zeros(5000,dtype='int') | |
for i in range(20000): | |
train_arrays[i] = model[i] | |
train_labels[i] = rating[i] | |
for i in range(5000): | |
test_arrays[i] = model[20000+i] | |
test_labels[i] = rating[20000+i] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment