Hands-On Machine Learning with C++
معرفی کتاب «Hands-On Machine Learning with C++» نوشتهٔ Kirill Kolodiazhnyi، منتشرشده توسط نشر Packt Publishing Limited در سال 2024. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Hands-On Machine Learning with C++» در دستهٔ بدون دستهبندی قرار دارد.
Apply supervised and unsupervised machine learning algorithms using C++ libraries, such as PyTorch C++ API, Flashlight, Blaze, mlpack, and dlib using real-world examples and datasets Key Features • 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 Book 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 is 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 Cover Title Page Copyright and Credits Dedication Contributors Table of Contents Preface Part 1:Overview of Machine Learning Chapter 1: Introduction to Machine Learning with C++ Understanding the fundamentals of ML Venturing into the techniques of ML Dealing with ML models Model parameter estimation An overview of linear algebra Learning the concepts of linear algebra Basic linear algebra operations Tensor representation in computing Linear algebra API samples An overview of linear regression Solving linear regression tasks with different libraries Solving linear regression tasks with Eigen Solving linear regression tasks with Blaze Solving linear regression tasks with ArrayFire Linear regression with Dlib Summary Further reading Chapter 2: 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 mlpack library Reading CSV files with the Dlib library Reading JSON files with the nlohmann-json library Writing and reading HDF5 files with the HighFive library Initializing matrix and tensor objects from C++ data structures Working with the Eigen library Working with the Blaze library Working with the Dlib library Working with the ArrayFire library Working with the mlpack library Manipulating images with the OpenCV and Dlib libraries Using OpenCV Using Dlib Transforming images into matrix or tensor objects of various libraries Deinterleaving in OpenCV Deinterleaving in Dlib Normalizing data Normalizing with Eigen Normalizing with mlpack Normalizing with Dlib Normalizing with Flashlight Summary Further reading Chapter 3: Measuring Performance and Selecting Models Technical requirements Performance metrics for ML models Regression metrics Classification metrics Understanding bias and variance characteristics Bias Variance Normal training Regularization Model selection with the grid search technique Cross-validation Grid search mlpack example Optuna with Flashlight example Dlib example Summary Further reading Part 2: Machine Learning Algorithms Chapter 4: Clustering Technical requirements Measuring distance in clustering Euclidean distance Squared Euclidean distance Manhattan distance Chebyshev distance Types of clustering algorithms Partition-based clustering algorithms Distance-based clustering algorithms Graph theory-based clustering algorithms Spectral clustering algorithms Hierarchical clustering algorithms Density-based clustering algorithms Model-based clustering algorithms Examples of using the mlpack library for dealing with the clustering task samples GMM and EM with mlpack K-means clustering with mlpack DBSCAN with mlpack MeanShift clustering with mlpack Examples of using the Dlib library for dealing with the clustering task samples K-means clustering with Dlib Spectral clustering with Dlib Hierarchical clustering with Dlib Newman modularity-based graph clustering algorithm with Dlib Chinese Whispers – graph clustering algorithm with Dlib Plotting data with C++ Summary Further reading Chapter 5: Anomaly Detection Technical requirements Exploring the applications of anomaly detection Learning approaches for anomaly detection Detecting anomalies with statistical tests Detecting anomalies with the Local Outlier Factor method Detecting anomalies with isolation forest Detecting anomalies with One-Class Support Vector Machine Density estimation approach Using multivariate Gaussian distribution for anomaly detection Examples of using different C++ libraries for anomaly detection C++ implementation of the isolation forest algorithm for anomaly detection Using the Dlib library for anomaly detection Summary Further reading Chapter 6: Dimensionality Reduction Technical requirements An overview of dimension-reduction methods Feature selection methods Dimensionality reduction methods Exploring linear methods for dimension-reduction Principal component analysis Singular value decomposition Independent component analysis Linear discriminant analysis Factor analysis Multidimensional scaling Exploring non-linear methods for dimension-reduction Kernel PCA Isomap Sammon mapping Distributed stochastic neighbor embedding Autoencoders Understanding dimension-reduction algorithms with various С++ libraries Using the Dlib library Using the Tapkee library Summary Further reading Chapter 7: Classification Technical requirements An overview of classification methods Exploring various classification methods Logistic regression KRR SVM kNN method Multi-class classification Examples of using C++ libraries for dealing with the classification task Using the mlpack library Using the Dlib library Using the Flashlight library Summary Further reading Chapter 8: 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 the collaborative filtering method Examples of item-based collaborative filtering with C++ Using the Eigen library Using the mlpack library Summary Further reading Chapter 9: Ensemble Learning Technical requirements An overview of ensemble learning Using a bagging approach for creating ensembles Using a gradient boosting method for creating ensembles Using a stacking approach for creating ensembles Using the random forest method for creating ensembles Examples of using C++ libraries for creating ensembles Ensembles with Dlib Ensembles with mlpack Summary Further reading Part 3: Advanced Examples Chapter 10: Neural Networks for Image Classification Technical requirements An overview of neural networks Neurons The perceptron and neural networks Training with the backpropagation method Loss functions Activation functions Regularization in neural networks Neural network initialization Delving into convolutional networks Convolution operator Pooling operation Receptive field Convolution network architecture What is deep learning? Examples of using C++ libraries to create neural networks Dlib mlpack Flashlight Understanding image classification using the LeNet architecture Reading the training dataset Neural network definition Network training Summary Further reading Chapter 11: Sentiment Analysis with BERT and Transfer Learning Technical requirements An overview of the Transformer architecture Encoder Decoder Tokenization Word embeddings Using the encoder and decoder parts separately Sentiment analysis example with BERT Exporting the model and vocabulary Implementing the tokenizer Implementing the dataset loader Implementing the model Training the model Summary Further reading Part 4: Production and Deployment Challenges Chapter 12: Exporting and Importing Models Technical requirements ML model serialization APIs in C++ libraries Model serialization with Dlib Model serialization with Flashlight Model serialization with mlpack Model serialization with PyTorch Delving into the ONNX format Using the ResNet architecture for image classification Loading images into onnxruntime tensors Reading the class definition file Summary Further reading Chapter 13: Tracking and Visualizing ML Experiments Technical requirements Understanding visualization and tracking systems for experiments TensorBoard MLflow Experiment tracking with MLflow’s REST API Implementing MLflow’s REST C++ client Logging metric values and running parameters Integrating experiment tracking into linear regression training Experiments tracking process Summary Further reading Chapter 14: Deploying Models on a Mobile Platform Technical requirements Developing object detection on Android The mobile version of the PyTorch framework Using TorchScript for a model snapshot The Android Studio project The Kotlin part of the project The native C++ part of the project Summary Further reading Index Other Books You May Enjoy
دانلود کتاب Hands-On Machine Learning with C++