in our scenariodocuments indicate the movie reviews and classes indicate the review sentiments that can either be positive or negativemaking it binary classification problem we will build models using both traditional machine learning methods and newer deep learning in the subsequent sections you can refer to the python file titled supervised_sentiment_analysis py for all the code used in this section or use the jupyter notebook titled sentiment analysis supervised ipynb for more interactive experience let' load the necessary dependencies and settings before getting started in [ ]import pandas as pd import numpy as np import text_normalizer as tn import model_evaluation_utils as meu np set_printoptions(precision= linewidth= we can now load our imdb movie reviews datasetuse the first , reviews for training models and the remaining , reviews as the test dataset to evaluate model performance besides thiswe will also use our normalization module to normalize our review datasets (steps and in our workflowin [ ]dataset pd read_csv( 'movie_reviews csv'take peek at the data print(dataset head()reviews np array(dataset['review']sentiments np array(dataset['sentiment']build train and test datasets train_reviews reviews[: train_sentiments sentiments[: test_reviews reviews[ :test_sentiments sentiments[ :normalize datasets norm_train_reviews tn normalize_corpus(train_reviewsnorm_test_reviews tn normalize_corpus(test_reviewsreview sentiment one of the other reviewers has mentioned that positive wonderful little production the positive thought this was wonderful way to spend ti positive basically there' family where little boy negative petter mattei' "love in the time of moneyis positive our datasets are now prepared and normalized so we can proceed from step in our text classification workflow described earlier to build our classification system traditional supervised machine learning models we will be using traditional classification models in this section to classify the sentiment of our movie reviews our feature engineering techniques (step will be based on the bag of words model and the tf-idf modelwhich we discussed extensively in the section titled "feature engineering on text datain the following snippet helps us engineer features using both these models on our train and test datasets