O'Reilly logo

Machine Learning Solutions by Jalaj Thanaki

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Training the baseline model

In this section, we will look at the code that helps us perform actual training on the training dataset. We will look at the implementation first, and then I will explain the code step by step. Here, we will be implementing Naive Bayes and SVM algorithms. For implementation, we will be using the scikit-learn library. You can find the code at this GitHub link: https://github.com/jalajthanaki/Sentiment_Analysis/blob/master/Baseline_approach.ipynb.

Implementing the baseline model

In order to understand the implementation of the baseline model, you can refer to the following code snippet:

Implementing the baseline model

Figure 5.8: Code snippet for performing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required