Book Image

Machine Learning Quick Reference

By : Rahul Kumar
Book Image

Machine Learning Quick Reference

By: Rahul Kumar

Overview of this book

Machine learning makes it possible to learn about the unknowns and gain hidden insights into your datasets by mastering many tools and techniques. This book guides you to do just that in a very compact manner. After giving a quick overview of what machine learning is all about, Machine Learning Quick Reference jumps right into its core algorithms and demonstrates how they can be applied to real-world scenarios. From model evaluation to optimizing their performance, this book will introduce you to the best practices in machine learning. Furthermore, you will also look at the more advanced aspects such as training neural networks and work with different kinds of data, such as text, time-series, and sequential data. Advanced methods and techniques such as causal inference, deep Gaussian processes, and more are also covered. By the end of this book, you will be able to train fast, accurate machine learning models at your fingertips, which you can easily use as a point of reference.
Table of Contents (18 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

Hyperplanes 


Many of you will have guessed it right. We use hyperplanes when it comes to more than 3D. We will define it using a bit of mathematics.

A linear equation looks like this: y = ax + b has got two variables, x and y, and a y-intercept, which is b. If we rename y as x2 and x as x1, the equation comes out as x2=ax1 + b which implies ax1 - x2 + b=0. If we define 2D vectors as x= (x1,x2) and w=(a,-1) and if we make use of the dot product, then the equation becomes w.x + b = 0. 

Note

Remember, x.y = x1y1 + x2y2.

So, a hyperplane is a set of points that satisfies the preceding equation. But how do we classify with the help of hyperplane?

We define a hypothesis function h:

h(xi) = +1 if w.xi + b ≥ 0

-1 if w.xi + b < 0

This could be equivalent to the following:

h(xi)= sign(w.xi + b) 

It could also be equivalent to the following:

sign(w.xi) if (x0=1 and w0=b)

What it means is that it will use the position of x with respect to the hyperplane to predict a value for y. A data point on one side of the...