1. Learn
  2. /
  3. Courses
  4. /
  5. Sentiment Analysis in Python

Connected

Exercise

Regularizing models with Twitter data

You will work with the Twitter data expressing customers' sentiment about airline companies. The X matrix of features and y vector of labels have been created for you. In addition, the training and testing split has been performed. You can work with the X_train, X_test, y_train and y_test arrays directly.

You will train regularized and a more flexible models and evaluate them using different model performance metrics.

All required packages have been imported for you.

Instructions

100 XP
  • Train two logistic regressions: one with regularization parameter of 100 and a second of 0.1.
  • Print the accuracy scores of both models.
  • Print the confusion matrix of each model.