Book Image

Mastering Predictive Analytics with Python

By : Joseph Babcock
Book Image

Mastering Predictive Analytics with Python

By: Joseph Babcock

Overview of this book

The volume, diversity, and speed of data available has never been greater. Powerful machine learning methods can unlock the value in this information by finding complex relationships and unanticipated trends. Using the Python programming language, analysts can use these sophisticated methods to build scalable analytic applications to deliver insights that are of tremendous value to their organizations. In Mastering Predictive Analytics with Python, you will learn the process of turning raw data into powerful insights. Through case studies and code examples using popular open-source Python libraries, this book illustrates the complete development process for analytic applications and how to quickly apply these methods to your own data to create robust and scalable prediction services. Covering a wide range of algorithms for classification, regression, clustering, as well as cutting-edge techniques such as deep learning, this book illustrates not only how these methods work, but how to implement them in practice. You will learn to choose the right approach for your problem and how to develop engaging visualizations to bring the insights of predictive modeling to life
Table of Contents (16 chapters)
Mastering Predictive Analytics with Python
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Chapter 5. Putting Data in its Place – Classification Methods and Analysis

In the previous chapter, we explored methods for analyzing data whose outcome is a continuous variable, such as the purchase volume for a customer account or the expected number of days until cancellation of a subscription service. However, many of the outcomes for data in business analyses are discrete—they may only take a limited number of values. For example, a movie review can be 1–5 stars (but only integers), a customer can cancel or renew a subscription, or an online advertisement can be clicked or ignored.

The methods used to model and predict outcomes for such data are similar to the regression models we covered in the previous chapter. Moreover, sometimes we might want to convert a regression problem into a classification problem: for instance, rather than predicting customer spending patterns in a month, we might be more interested in whether it is above a certain threshold that is meaningful from a business...