Book Image

Machine Learning with Swift

By : Jojo Moolayil, Alexander Sosnovshchenko, Oleksandr Baiev
Book Image

Machine Learning with Swift

By: Jojo Moolayil, Alexander Sosnovshchenko, Oleksandr Baiev

Overview of this book

Machine learning as a field promises to bring increased intelligence to the software by helping us learn and analyse information efficiently and discover certain patterns that humans cannot. This book will be your guide as you embark on an exciting journey in machine learning using the popular Swift language. We’ll start with machine learning basics in the first part of the book to develop a lasting intuition about fundamental machine learning concepts. We explore various supervised and unsupervised statistical learning techniques and how to implement them in Swift, while the third section walks you through deep learning techniques with the help of typical real-world cases. In the last section, we will dive into some hard core topics such as model compression, GPU acceleration and provide some recommendations to avoid common mistakes during machine learning application development. By the end of the book, you'll be able to develop intelligent applications written in Swift that can learn for themselves.
Table of Contents (18 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Introducing simple linear regression


Linear regression is a kind of steampunk machine learning. It was invented in the time of Sherlock Holmes, long before the first electronic computer was invented and the term machine learning was coined. The term regression and its calculation algorithm was introduced by the English polymath Sir Francis Galton in 1886, in the publication named Regression towards Mediocrity in Hereditary Stature. Galton proposed the concept while performing research on how to create the perfect breed of people. The task of regression emerged from the need to predict the child's body parameters given the parent's body measurements. So nowadays, Sir Galton is mostly remembered as the father of eugenics rather than as an inventor of the first machine learning algorithm. Later in this chapter, we will follow the footsteps of Galton (but not too far), and employ the linear regression to predict some biological data. Linear regression often is the best choice of machine learning...