Skip to Main Content
Programming Machine Learning
book

Programming Machine Learning

by Paolo Perrotta
March 2020
Beginner to intermediate content levelBeginner to intermediate
342 pages
8h 38m
English
Pragmatic Bookshelf
Content preview from Programming Machine Learning

Adding a Bias

Look at the chart we just plotted. Our line is not quite the best approximation of the examples, is it? The perfect line would have less slope, and it wouldn’t pass by the origin. Give or take, it would cross the “Pizzas” axis around the value of 10.

So far, we forced the line to pass by the origin to keep our model as simple as we could. It’s time to remove that constraint. To draw a line that is not constrained to pass by the origin, we need one more parameter in our model:

 ŷ = x * w + b

You might experience déjà vu here. This equation is the classic linear function which you may have studied in 8th grade. Most people would remember it as y = m * x + b, where m is called the “slope” and b is called the “y-intercept.” Here, we’ll ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Machine Learning Algorithms - Second Edition

Mastering Machine Learning Algorithms - Second Edition

Giuseppe Bonaccorso
Practical Machine Learning for Computer Vision

Practical Machine Learning for Computer Vision

Valliappa Lakshmanan, Martin Görner, Ryan Gillard

Publisher Resources

ISBN: 9781680507706Errata Page