Created
July 17, 2020 12:44
-
-
Save prateekjoshi565/a6ba56d3e5f96acd0d7a78c03c106699 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
# split train dataset into train, validation and test sets | |
train_text, temp_text, train_labels, temp_labels = train_test_split(df['text'], df['label'], | |
random_state=2018, | |
test_size=0.3, | |
stratify=df['label']) | |
val_text, test_text, val_labels, test_labels = train_test_split(temp_text, temp_labels, | |
random_state=2018, | |
test_size=0.5, | |
stratify=temp_labels) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment