Last active
November 5, 2020 15:45
-
-
Save Sanket758/14c3268865566d506eeed221da5e753c 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
# Load the csv file | |
df = pd.read_csv('IMDB_reviews.csv') | |
# Extract the reviews and sentiments | |
reviews = np.array(df['review']) | |
sentiments = np.array(df['sentiment']) | |
# splitting the data into train and test sets | |
train_reviews = reviews[:35000] | |
train_sentiment = reviews[:35000] | |
test_reviews = reviews[35000:] | |
test_sentiments = sentiments[35000:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment