Book Image

Machine Learning for Mobile

By : Revathi Gopalakrishnan, Avinash Venkateswarlu
Book Image

Machine Learning for Mobile

By: Revathi Gopalakrishnan, Avinash Venkateswarlu

Overview of this book

Machine learning presents an entirely unique opportunity in software development. It allows smartphones to produce an enormous amount of useful data that can be mined, analyzed, and used to make predictions. This book will help you master machine learning for mobile devices with easy-to-follow, practical examples. You will begin with an introduction to machine learning on mobiles and grasp the fundamentals so you become well-acquainted with the subject. You will master supervised and unsupervised learning algorithms, and then learn how to build a machine learning model using mobile-based libraries such as Core ML, TensorFlow Lite, ML Kit, and Fritz on Android and iOS platforms. In doing so, you will also tackle some common and not-so-common machine learning problems with regard to Computer Vision and other real-world domains. By the end of this book, you will have explored machine learning in depth and implemented on-device machine learning with ease, thereby gaining a thorough understanding of how to run, create, and build real-time machine-learning applications on your mobile devices.
Table of Contents (19 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Question and Answers
Index

Understanding linear SVM algorithm


InChapter 2, Supervised and Unsupervised Learning Algorithms, we covered the SVM algorithm and now have an idea of how the SVM model works. A linear support vector machine or linear SVM is a linear classifier that tries to find a hyperplane with the largest margin that splits the input space into two regions. 

Note

A hyperplane is a generalization of a plane. In one dimension, a hyperplane is called a point. In two dimensions, it is a line. In three dimensions, it is a plane. In more dimensions, you can call it a hyperplane.

As we saw, the goal of SVM is to identify the hyperplane that tries to find the largest margin that splits the input space into two regions. If the input space is linearly separable, it is easy to separate them. However, in real life, we find that the input space is very non-linear:

In the preceding scenario, the SVM can help us separate the red and blue balls by using what is called a Kernel Trick, which is the method of using a linear...