Created
August 2, 2020 14:47
-
-
Save kipronokoech/c675881c221ba7c903fe65d579af0d80 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
# 70% for training and 30% testing | |
training, test = train_test_split(reviews, test_size=0.30, random_state=42) | |
# define the independent (X) and target (y) | |
train_x,train_y = [x.text for x in training],[x.sentiment for x in training] | |
test_x,test_y = [x.text for x in test],[x.sentiment for x in test] | |
print("Size of train set: ",len(training)) | |
print("Size of train set: ",len(test)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment