gradient descent (refer to the section"the three stages of logistic regressionin if you are interested in more detailslogistic regression is also popularly known as logit regression or maxent (maximum entropyclassifier we will now use our utility function train_predict_modelfrom our model_evaluation_utils module to build logistic regression model on our training features and evaluate the model performance on our test features (steps and see figure - in [ ]logistic regression model on bow features lr_bow_predictions meu train_predict_model(classifier=lrtrain_features=cv_train_featurestrain_labels=train_ sentimentstest_features=cv_test_featurestest_labels=test_sentimentsmeu display_model_performance_metrics(true_labels=test_sentimentspredicted_labels=lr_bow_predictionsclasses=['positive''negative']figure - model performance metrics for logistic regression on bag of words features we get an overall -score and model accuracy of %as depicted in figure - which is really excellentwe can now build logistic regression model similarly on our tf-idf features using the following snippet see figure - in [ ]logistic regression model on tf-idf features lr_tfidf_predictions meu train_predict_model(classifier=lrtrain_features=tv_train_featurestrain_labels=train_ sentimentstest_features=tv_test_featurestest_labels=test_sentimentsmeu display_model_performance_metrics(true_labels=test_sentimentspredicted_labels=lr_tfidf_predictionsclasses=['positive''negative']figure - model performance metrics for logistic regression on tf-idf features