Book Image

Machine Learning with Core ML

Book Image

Machine Learning with Core ML

Overview of this book

Core ML is a popular framework by Apple, with APIs designed to support various machine learning tasks. It allows you to train your machine learning models and then integrate them into your iOS apps. Machine Learning with Core ML is a fun and practical guide that not only demystifies Core ML but also sheds light on machine learning. In this book, you’ll walk through realistic and interesting examples of machine learning in the context of mobile platforms (specifically iOS). You’ll learn to implement Core ML for visual-based applications using the principles of transfer learning and neural networks. Having got to grips with the basics, you’ll discover a series of seven examples, each providing a new use-case that uncovers how machine learning can be applied along with the related concepts. By the end of the book, you will have the skills required to put machine learning to work in their own applications, using the Core ML APIs
Table of Contents (16 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

A typical ML workflow 


If we analyze each of the examples presented so far, we see that each follows a similar pattern. First is the definition of the problem or desired functionality. Once we have established what we want to do, we then identify the available data and/or what data is required. With the data in hand, our next step is to create our ML model and prepare the data for training.

After training, something we hadn't discussed here, is validating our ML model, that is, testing that it satisfactorily achieves what we require of it. An example is being able to make an accurate prediction. Once we have trained a model, we can make use of it by feeding in real data, that is, data outside our training set. In the following diagram, we see these steps summarized for training and inference: 

We will spend most of our time using trained models in this book, but understanding how we arrive at these models will prove helpful as you start creating your own intelligent apps. This will also help you identify opportunities to apply ML on existing data or inspire you to seek out new data sources. It's also worth noting that the preprocessing step on training data is equivalent to preprocessing on input data when performing inference—something we will spend a lot of time discussing and coding for throughout this book.