Book description
Implement supervised and unsupervised machine learning algorithms using C++ libraries such as PyTorch C++ API, Caffe2, Shogun, Shark-ML, mlpack, and dlib with the help of real-world examples and datasets
Key Features
- Become familiar with data processing, performance measuring, and model selection using various C++ libraries
- Implement practical machine learning and deep learning techniques to build smart models
- Deploy machine learning models to work on mobile and embedded devices
Book Description
C++ can make your machine learning models run faster and more efficiently. This handy guide will help you learn the fundamentals of machine learning (ML), showing you how to use C++ libraries to get the most out of your data. This book makes machine learning with C++ for beginners easy with its example-based approach, demonstrating how to implement supervised and unsupervised ML algorithms through real-world examples.
This book will get you hands-on with tuning and optimizing a model for different use cases, assisting you with model selection and the measurement of performance. You'll cover techniques such as product recommendations, ensemble learning, and anomaly detection using modern C++ libraries such as PyTorch C++ API, Caffe2, Shogun, Shark-ML, mlpack, and dlib. Next, you'll explore neural networks and deep learning using examples such as image classification and sentiment analysis, which will help you solve various problems. Later, you'll learn how to handle production and deployment challenges on mobile and cloud platforms, before discovering how to export and import models using the ONNX format.
By the end of this C++ book, you will have real-world machine learning and C++ knowledge, as well as the skills to use C++ to build powerful ML systems.
What you will learn
- Explore how to load and preprocess various data types to suitable C++ data structures
- Employ key machine learning algorithms with various C++ libraries
- Understand the grid-search approach to find the best parameters for a machine learning model
- Implement an algorithm for filtering anomalies in user data using Gaussian distribution
- Improve collaborative filtering to deal with dynamic user preferences
- Use C++ libraries and APIs to manage model structures and parameters
- Implement a C++ program to solve image classification tasks with LeNet architecture
Who this book is for
You will find this C++ machine learning book useful if you want to get started with machine learning algorithms and techniques using the popular C++ language. As well as being a useful first course in machine learning with C++, this book will also appeal to data analysts, data scientists, and machine learning developers who are looking to implement different machine learning models in production using varied datasets and examples. Working knowledge of the C++ programming language is mandatory to get started with this book.
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
- Section 1: Overview of Machine Learning
- Introduction to Machine Learning with C++
-
Data Processing
- Technical requirements
-
Parsing data formats to C++ data structures
- Reading CSV files with the Fast-CPP-CSV-Parser library
- Preprocessing CSV files
- Reading CSV files with the Shark-ML library
- Reading CSV files with the Shogun library
- Reading CSV files with the Dlib library
- Reading JSON files with the RapidJSON library
- Writing and reading HDF5 files with the HighFive library
- Initializing matrix and tensor objects from C++ data structures
- Manipulating images with the OpenCV and Dlib libraries
- Transforming images into matrix or tensor objects of various libraries
- Normalizing data
- Summary
- Further reading
- Measuring Performance and Selecting Models
- Section 2: Machine Learning Algorithms
-
Clustering
- Technical requirements
- Measuring distance in clustering
- Types of clustering algorithms
- Examples of using the Shogun library for dealing with the clustering task samples
- Examples of using the Shark-ML library for dealing with the clustering task samples
- Examples of using the Dlib library for dealing with the clustering task samples
- Plotting data with C++
- Summary
- Further reading
- Anomaly Detection
- Dimensionality Reduction
- Classification
-
Recommender Systems
- Technical requirements
-
An overview of recommender system algorithms
- Non-personalized recommendations
- Content-based recommendations
- User-based collaborative filtering
- Item-based collaborative filtering
- Factorization algorithms
- Similarity or preferences correlation
- Data scaling and standardization
- Cold start problem
- Relevance of recommendations
- Assessing system quality
- Understanding collaborative filtering method details
- Examples of item-based collaborative filtering with C++
- Summary
- Further reading
- Ensemble Learning
- Section 3: Advanced Examples
-
Neural Networks for Image Classification
- Technical requirements
- An overview of neural networks
- Delving into convolutional networks
- What is deep learning?
- Examples of using C++ libraries to create neural networks
- Understanding image classification using the LeNet architecture
- Summary
- Further reading
- Sentiment Analysis with Recurrent Neural Networks
- Section 4: Production and Deployment Challenges
- Exporting and Importing Models
- Deploying Models on Mobile and Cloud Platforms
- Other Books You May Enjoy
Product information
- Title: Hands-On Machine Learning with C++
- Author(s):
- Release date: May 2020
- Publisher(s): Packt Publishing
- ISBN: 9781789955330
You might also like
video
Linear Algebra for Machine Learning
6.5 Hours of Video Instruction An introduction to the linear algebra behind machine learning models Overview …
book
Machine Learning Algorithms - Second Edition
An easy-to-follow, step-by-step guide for getting to grips with the real-world application of machine learning algorithms …
book
Python Machine Learning - Third Edition
Applied machine learning with a solid foundation in theory. Revised and expanded for TensorFlow 2, GANs, …
book
Introduction to Machine Learning with Python
Machine learning has become an integral part of many commercial applications and research projects, but this …