Book Image

Python Machine Learning Blueprints - Second Edition

By : Alexander Combs, Michael Roman
Book Image

Python Machine Learning Blueprints - Second Edition

By: Alexander Combs, Michael Roman

Overview of this book

Machine learning is transforming the way we understand and interact with the world around us. This book is the perfect guide for you to put your knowledge and skills into practice and use the Python ecosystem to cover key domains in machine learning. This second edition covers a range of libraries from the Python ecosystem, including TensorFlow and Keras, to help you implement real-world machine learning projects. The book begins by giving you an overview of machine learning with Python. With the help of complex datasets and optimized techniques, you’ll go on to understand how to apply advanced concepts and popular machine learning algorithms to real-world projects. Next, you’ll cover projects from domains such as predictive analytics to analyze the stock market and recommendation systems for GitHub repositories. In addition to this, you’ll also work on projects from the NLP domain to create a custom news feed using frameworks such as scikit-learn, TensorFlow, and Keras. Following this, you’ll learn how to build an advanced chatbot, and scale things up using PySpark. In the concluding chapters, you can look forward to exciting insights into deep learning and you'll even create an application using computer vision and neural networks. By the end of this book, you’ll be able to analyze data seamlessly and make a powerful impact through your projects.
Table of Contents (13 chapters)

Building a predictive content scoring model

Let's use what we have learned to create a model that can estimate the share counts for a given piece of content. We'll use the features we have already created, along with a number of additional ones.

Ideally, we would have a much larger sample of content—especially content that had more typical share counts—but we'll have to make do with what we have here.

We're going to be using an algorithm called random forest regression. In previous chapters, we looked at a more typical implementation of random forests that is based on classification, but here we're going to attempt to predict the share counts. We could consolidate our share classes into ranges, but it is preferable to use regression when dealing with continuous variables, which is what we're working with here.

To begin, we'll create...