Book Image

Test Driven Machine Learning

Book Image

Test Driven Machine Learning

Overview of this book

Table of Contents (16 chapters)
Test-Driven Machine Learning
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Perceptively Testing a Perceptron
Index

Getting started


A perceptron is a binary linear classifier. Like other supervised learning techniques, we can feed in rows of data along with the appropriate classification. After enough of these, the perceptron can begin to label new rows of data that have yet to be classified. Specifically, a perceptron works by adjusting a hyperplane to separate two groups of data as accurately as possible (with a linear classifier). Said a bit more simply, that means that we will have some data in a space and then perturb something like a line until it can act as an arbiter of what fits in one classification or another.

If you want to visualize it, think of 2D data being separated by a line like so:

We'll be using TDD to develop the algorithm ourselves as an example of breaking very large problems down as much as possible. In later chapters, we will lean on third-party libraries for other implementations and focus on other ways to drive your machine learning forward in discrete steps.

It can be hard to...