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

Introduction to vectors


Before moving on to the core topic, we would like to build a foundation for getting there. Hence, this segment of the chapter is very important. It might look familiar to you and many of you will be cognizant about this. However, going through this channel will set the flow.

A vector is an object that has both a direction and magnitude. It is represented by an arrow and with a coordinate (x, y) in space, as shown in the following plot:

As shown in the preceding diagram, the vector OA has the coordinates (4,3)

Vector OA= (4,3)

However, it is not sufficient to define a vector just by coordinates—we also need a direction. That means the direction from the x axis.

Magnitude of the vector

The magnitude of the vector is also called the norm. It is represented by ||OA||:

To find out magnitude of this vector, we can follow the Pythagorean theorem:

OA= OB2 + AB2

= 4+ 32 

= 16 + 9

= 25

Hence:

OA = √25 = 5

||OA||= 5

So, if there is a vector x = (x1,x2,....,xn):

||x||= x1+ x22+........