Book description
Leverage the power of machine learning and Swift programming to build intelligent iOS applications with ease
About This Book
- Implement effective machine learning solutions for your iOS applications
- Use Swift and Core ML to build and deploy popular machine learning models
- Develop neural networks for natural language processing and computer vision
Who This Book Is For
iOS developers who wish to create smarter iOS applications using the power of machine learning will find this book to be useful. This book will also benefit data science professionals who are interested in performing machine learning on mobile devices. Familiarity with Swift programming is all you need to get started with this book.
What You Will Learn
- Learn rapid model prototyping with Python and Swift
- Deploy pre-trained models to iOS using Core ML
- Find hidden patterns in the data using unsupervised learning
- Get a deeper understanding of the clustering techniques
- Learn modern compact architectures of neural networks for iOS devices
- Train neural networks for image processing and natural language processing
In Detail
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.
Style and approach
A comprehensive guide that teaches how to implement machine learning apps for iOS from scratc
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- Getting Started with Machine Learning
-
Classification – Decision Tree Learning
- Machine learning toolbox
- Prototyping the first machine learning app
- IPython notebook crash course
- Time to practice
- Machine learning for extra-terrestrial life explorers
- Loading the dataset
- Exploratory data analysis
- Data preprocessing
- Decision trees everywhere
- Training the decision tree classifier
- How decision tree learning works
- Implementing first machine learning app in Swift
- Introducing Core ML
- Summary
-
K-Nearest Neighbors Classifier
- Calculating the distance
- Using instance-based models for classification and clustering
- People motion recognition using inertial sensors
- Understanding the KNN algorithm
- Recognizing human motion using KNN
- Reasoning in high-dimensional spaces
- KNN pros
- KNN cons
- Improving our solution
- Summary
- Bibliography
- K-Means Clustering
-
Association Rule Learning
- Seeing association rules
- Defining data structures
- Using association measures to assess rules
- Decomposing the problem
- Generating all possible rules
- Finding frequent item sets
- The Apriori algorithm
- Implementing Apriori in Swift
- Running Apriori
- Running Apriori on real-world data
- The pros and cons of Apriori
- Building an adaptable user experience
- Summary
- Bibliography
- Linear Regression and Gradient Descent
- Linear Classifier and Logistic Regression
- Neural Networks
-
Convolutional Neural Networks
- Understanding users emotions
- Introducing computer vision problems
- Introducing convolutional neural networks
- Pooling operation
- Convolution operation
- Building the network
- Loss functions
- Training the network
- Training the CNN for facial expression recognition
- Environment setup
- Deep learning frameworks
- Loading the data
- Splitting the data
- Data augmentation
- Creating the network
- Plotting the network structure
- Training the network
- Plotting loss
- Making predictions
- Saving the model in HDF5 format
- Converting to Core ML format
- Visualizing convolution filters
- Deploying CNN to iOS
- Summary
- Bibliography
-
Natural Language Processing
- NLP in the mobile development world
- Word Association game
- Python NLP libraries
- Textual corpuses
- Common NLP approaches and subtasks
- Distributional semantics hypothesis
- Word vector representations
- Autoencoder neural networks
- Word2Vec
- Word2Vec in Gensim
- Vector space properties
- iOS application
- Word2Vec friends and relatives
- Where to go from here?
- Summary
- Machine Learning Libraries
- Optimizing Neural Networks for Mobile Devices
- Best Practices
Product information
- Title: Machine Learning with Swift
- Author(s):
- Release date: February 2018
- Publisher(s): Packt Publishing
- ISBN: 9781787121515
You might also like
book
Machine Learning with Core ML
Leverage the power of Apple's Core ML to create smart iOS apps About This Book Explore …
book
Deep Learning with Swift for TensorFlow: Differentiable Programming with Swift
About this book Discover more insight about deep learning algorithms with Swift for TensorFlow. The Swift …
book
Python Machine Learning Cookbook - Second Edition
Discover powerful ways to effectively solve real-world machine learning problems using key libraries including scikit-learn, TensorFlow, …
book
Practical Artificial Intelligence with Swift
Create and implement AI-based features in your Swift apps for iOS, macOS, tvOS, and watchOS. With …