O'Reilly logo

Scala: Guide for Data Science Professionals by Patrick R. Nicolas, Arun Manivannan, Pascal Bugnion

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

Naïve Bayes and text mining

The multinomial Naïve Bayes classifier is particularly suited for text mining. Naïve Bayes is used to classify the following entities:

  • E-mails as legitimate versus spam
  • Business news stories
  • Movie reviews and scoring
  • Technical papers as per field of expertise

This third use case consists of predicting the direction of a stock, Tesla Motors Inc, (ticker symbol: TSLA) give the financial news. The features are the frequency of occurrence of some specific terms related to the stock. It is unclear how fast the investor or trader reacts to the news and influence, if any, of the value of a stock. Therefore, the delayed response time, as depicted in the following chart, should be a feature of the proposed model:

The feature market ...

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