[go: up one dir, main page]

Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Hands-On Machine Learning with C++
Hands-On Machine Learning with C++

Hands-On Machine Learning with C++: Build, train, and deploy end-to-end machine learning and deep learning pipelines , Second Edition

Arrow left icon
Profile Icon Kirill Kolodiazhnyi
Arrow right icon
Can$44.99 Can$50.99
eBook Jan 2025 512 pages 2nd Edition
eBook
Can$44.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
Arrow left icon
Profile Icon Kirill Kolodiazhnyi
Arrow right icon
Can$44.99 Can$50.99
eBook Jan 2025 512 pages 2nd Edition
eBook
Can$44.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
eBook
Can$44.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Hands-On Machine Learning with C++

Introduction to Machine Learning with C++

There are different approaches to making computers solve tasks. One of them is to define an explicit algorithm, and another one is to use implicit strategies based on mathematical and statistical methods. Machine learning (ML) is one of the implicit methods that uses mathematical and statistical approaches to solve tasks. It is an actively growing discipline, and a lot of scientists and researchers find it to be one of the best ways to move forward toward systems acting as human-level artificial intelligence (AI).

In general, ML approaches have the idea of searching patterns in a given dataset as their basis. Consider a recommendation system for a news feed, which provides the user with a personalized feed based on their previous activity or preferences. The software gathers information about the type of news article the user reads and calculates some statistics. For example, it could be the frequency of some topics appearing in a set of...

Understanding the fundamentals of ML

There are different approaches to creating and training ML models. In this section, we show what these approaches are and how they differ. Apart from the approach we use to create an ML model, there are also parameters that manage how this model behaves in the training and evaluation processes. Model parameters can be divided into two distinct groups, which should be configured in different ways. The first group of parameters is the model weights in ML algorithms that are used to adjust the model’s predictions. They are assigned numerical values during the training process, and these values determine how the model makes decisions or predictions based on new data. The second group is the model hyperparameters that control the behavior of an ML model during training. They are not learned from the data like other parameters in the model but, rather, are set by the user or algorithm before training begins. The last crucial part of the ML process...

An overview of linear algebra

The concepts of linear algebra are essential for understanding the theory behind ML because they help us understand how ML algorithms work under the hood. Also, most ML algorithm definitions use linear algebra terms.

Linear algebra is not only a handy mathematical instrument but also the concepts of linear algebra can be very efficiently implemented with modern computer architectures. The rise of ML, and especially deep learning, began after significant performance improvement of the modern graphics processing unit (GPU). GPUs were initially designed to work with linear algebra concepts and massively parallel computations used in computer games. After that, special libraries were created to work with general linear algebra concepts. Examples of libraries that implement basic linear algebra routines are Cuda and OpenCL, and one example of a specialized linear algebra library is cuBLAS. Moreover, it became more common to use general-purpose graphics processing...

An overview of linear regression

Consider an example of the real-world supervised ML algorithm called linear regression. In general, linear regression is an approach for modeling a target value (dependent value) based on an explanatory value (independent value). This method is used for forecasting and finding relationships between values. We can classify regression methods by the number of inputs (independent variables) and the type of relationship between the inputs and outputs (dependent variables).

Simple linear regression is the case where the number of independent variables is 1, and there is a linear relationship between the independent (x) and dependent (y) variables.

Linear regression is widely used in different areas such as scientific research, where it can describe relationships between variables, as well as in applications within industry, such as revenue prediction. For example, it can estimate a trend line that represents the long-term movement in the stock price...

Summary

In this chapter, we learned what ML is, how it differs from other computer algorithms, and how it became so popular. We also became familiar with the necessary mathematical background required to begin working with ML algorithms. We looked at software libraries that provide APIs for linear algebra and also implemented our first ML algorithm—linear regression.

There are other linear algebra libraries for C++. Moreover, the popular deep learning frameworks use their own implementations of linear algebra libraries. For example, the MXNet framework is based on the mshadow library, and the PyTorch framework is based on the ATen library. Some of these libraries can use GPU or special CPU instructions to speed up calculations. Such features do not usually change the API but require some additional library initialization settings or explicit object conversion to different backends such as CPUs or GPUs.

Real ML projects can be challenging and complex. Common pitfalls include...

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Familiarize yourself 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
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

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 new edition has been updated with key topics such as sentiment analysis implementation using transfer learning and transformer-based models, as well as tracking and visualizing ML experiments with MLflow. An additional section shows you how to use Optuna for hyperparameter selection. The section on model deployment into mobile platform now 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.

Who is this book for?

This book is for beginners looking to explore machine learning algorithms and techniques using C++. This book is also valuable for data analysts, scientists, and developers who want to implement machine learning models in production. Working knowledge of C++ is needed to make the most of this book.

What you will learn

  • Employ key machine learning algorithms using various C++ libraries
  • Load and pre-process different data types to suitable C++ data structures
  • Find out how to identify the best parameters for a machine learning model
  • Use anomaly detection for filtering user data
  • Apply collaborative filtering to manage dynamic user preferences
  • Utilize C++ libraries and APIs to manage model structures and parameters
  • Implement C++ code for object detection using a modern neural network

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 24, 2025
Length: 512 pages
Edition : 2nd
Language : English
ISBN-13 : 9781805126140
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jan 24, 2025
Length: 512 pages
Edition : 2nd
Language : English
ISBN-13 : 9781805126140
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Table of Contents

20 Chapters
Part 1:Overview of Machine Learning Chevron down icon Chevron up icon
Chapter 1: Introduction to Machine Learning with C++ Chevron down icon Chevron up icon
Chapter 2: Data Processing Chevron down icon Chevron up icon
Chapter 3: Measuring Performance and Selecting Models Chevron down icon Chevron up icon
Part 2: Machine Learning Algorithms Chevron down icon Chevron up icon
Chapter 4: Clustering Chevron down icon Chevron up icon
Chapter 5: Anomaly Detection Chevron down icon Chevron up icon
Chapter 6: Dimensionality Reduction Chevron down icon Chevron up icon
Chapter 7: Classification Chevron down icon Chevron up icon
Chapter 8: Recommender Systems Chevron down icon Chevron up icon
Chapter 9: Ensemble Learning Chevron down icon Chevron up icon
Part 3: Advanced Examples Chevron down icon Chevron up icon
Chapter 10: Neural Networks for Image Classification Chevron down icon Chevron up icon
Chapter 11: Sentiment Analysis with BERT and Transfer Learning Chevron down icon Chevron up icon
Part 4: Production and Deployment Challenges Chevron down icon Chevron up icon
Chapter 12: Exporting and Importing Models Chevron down icon Chevron up icon
Chapter 13: Tracking and Visualizing ML Experiments Chevron down icon Chevron up icon
Chapter 14: Deploying Models on a Mobile Platform Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.