Book Image

Principles of Data Science - Second Edition

By : Sinan Ozdemir, Sunil Kakade, Marco Tibaldeschi
Book Image

Principles of Data Science - Second Edition

By: Sinan Ozdemir, Sunil Kakade, Marco Tibaldeschi

Overview of this book

Need to turn programming skills into effective data science skills? This book helps you connect mathematics, programming, and business analysis. You’ll feel confident asking—and answering—complex, sophisticated questions of your data, making abstract and raw statistics into actionable ideas. Going through the data science pipeline, you'll clean and prepare data and learn effective data mining strategies and techniques to gain a comprehensive view of how the data science puzzle fits together. You’ll learn fundamentals of computational mathematics and statistics and pseudo-code used by data scientists and analysts. You’ll learn machine learning, discovering statistical models that help control and navigate even the densest datasets, and learn powerful visualizations that communicate what your data means.
Table of Contents (17 chapters)
16
Index

Case study 1 – Predicting stock prices based on social media

Our first case study will be quite exciting! We will attempt to predict the price of the stock of a publicly traded company using only social media sentiment. While this example will not use any explicit statistical/machine learning algorithms, we will utilize exploratory data analysis (EDA) and use visuals in order to achieve our goal.

Text sentiment analysis

When talking about sentiment, it should be clear what is meant. By sentiment, I am referring to a quantitative value (at the interval level) between -1 and 1. If the sentiment score of a text piece is close to -1, it is said to have negative sentiment. If the sentiment score is close to 1, then the text is said to have positive sentiment. If the sentiment score is close to 0, we say it has neutral sentiment. We will use a Python module called TextBlob to measure our text sentiment:

from textblob import TextBlob# use the textblob module to make a function called stringToSentiment...