Book Image

Python Machine Learning Blueprints: Intuitive data projects you can relate to

By : Alexander T. Combs
Book Image

Python Machine Learning Blueprints: Intuitive data projects you can relate to

By: Alexander T. Combs

Overview of this book

<p>Machine Learning is transforming the way we understand and interact with the world around us. But how much do you really understand it? How confident are you interacting with the tools and models that drive it?</p> <p>Python Machine Learning Blueprints puts your skills and knowledge to the test, guiding you through the development of some awesome machine learning applications and algorithms with real-world examples that demonstrate how to put concepts into practice.</p> <p>You’ll learn how to use cluster techniques to discover bargain air fares, and apply linear regression to find yourself a cheap apartment – and much more. Everything you learn is backed by a real-world example, whether its data manipulation or statistical modelling.</p> <p>That way you’re never left floundering in theory – you’ll be simply collecting and analyzing data in a way that makes a real impact.</p>
Table of Contents (16 chapters)
Python Machine Learning Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Working with images


When we first introduced natural language processing, we learned that we would need to perform some sort of transformation in order to represent the words numerically. We did this by creating a term-document matrix. Now that we're dealing with pictures, we'll need to perform another sort of transformation to render the images in a numeric form.

Let's take a look at an image of a few handwritten digits:

These particular digits are taken from the MNIST database of handwritten digits. (Yes, this really is a thing.) This database contains tens of thousands digits like this collected from the handwriting samples of US Census Bureau employees and high school students.

Let's suppose now that we wanted to use machine learning to recognize these digits. How might we represent them numerically from the data that we have?

One way might be to map each pixel in our image to a value in a numeric matrix of the same size. We could then represent some property of that pixel as a value in...