Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Hands-On Machine Learning with C++
  • Table Of Contents Toc
Hands-On Machine Learning with C++

Hands-On Machine Learning with C++ - Second Edition

By : Kirill Kolodiazhnyi
3.8 (6)
close
close
Hands-On Machine Learning with C++

Hands-On Machine Learning with C++

3.8 (6)
By: Kirill Kolodiazhnyi

Overview of this book

Written by a seasoned software engineer with several years of industry experience, this book will teach you the basics of machine learning (ML) and show you how to use C++ libraries, along with helping you create supervised and unsupervised ML models. You’ll gain hands-on experience in tuning and optimizing a model for various use cases, enabling you to efficiently select models and measure performance. The chapters cover techniques such as product recommendations, ensemble learning, anomaly detection, sentiment analysis, and object recognition using modern C++ libraries. You’ll also learn how to overcome production and deployment challenges on mobile platforms, and see how the ONNX model format can help you accomplish these tasks. This edition is updated with key topics such as sentiment analysis implementation using transfer learning and transformer-based models, with tracking and visualizing ML experiments with MLflow. An additional section shows how to use Optuna for hyperparameter selection. The section on model deployment into mobile platform includes a detailed explanation of real-time object detection for Android with C++. By the end of this C++ book, you’ll have real-world machine learning and C++ knowledge, as well as the skills to use C++ to build powerful ML systems. *Email sign-up and proof of purchase required
Table of Contents (19 chapters)
close
close
Lock Free Chapter
1
Section 1: Overview of Machine Learning
5
Section 2: Machine Learning Algorithms
12
Section 3: Advanced Examples
15
Section 4: Production and Deployment Challenges

Initializing matrix and tensor objects from C++ data structures

There are a variety of file formats used for datasets, and not all of them might be supported by libraries. For using data from unsupported formats, we might need to write custom parsers. After we read values to regular C++ containers, we usually need to convert them into object types used in the ML framework we use. As an example, let’s consider the case of reading matrix data from files into C++ objects.

Working with the Eigen library

Using the Eigen library, we can wrap a C++ array into an Eigen::Matrix object with the Eigen::Map type. The wrapped object will behave as a standard Eigen matrix. We have to parametrize the Eigen::Map type with the type of matrix that has the required behavior. Also, when we create the Eigen::Map object, it takes as arguments a pointer to the C++ array and matrix dimensions, as illustrated in the following code snippet:

std::vector<double> values;
...
auto x_data ...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Hands-On Machine Learning with C++
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon