Machine and Deep Learning Using MATLAB

Book description

MACHINE AND DEEP LEARNING

In-depth resource covering machine and deep learning methods using MATLAB tools and algorithms, providing insights and algorithmic decision-making processes

Machine and Deep Learning Using MATLAB introduces early career professionals to the power of MATLAB to explore machine and deep learning applications by explaining the relevant MATLAB tool or app and how it is used for a given method or a collection of methods. Its properties, in terms of input and output arguments, are explained, the limitations or applicability is indicated via an accompanied text or a table, and a complete running example is shown with all needed MATLAB command prompt code.

The text also presents the results, in the form of figures or tables, in parallel with the given MATLAB code, and the MATLAB written code can be later used as a template for trying to solve new cases or datasets. Throughout, the text features worked examples in each chapter for self-study with an accompanying website providing solutions and coding samples. Highlighted notes draw the attention of the user to critical points or issues.

Readers will also find information on:

  • Numeric data acquisition and analysis in the form of applying computational algorithms to predict the numeric data patterns (clustering or unsupervised learning)
  • Relationships between predictors and response variable (supervised), categorically sub-divided into classification (discrete response) and regression (continuous response)
  • Image acquisition and analysis in the form of applying one of neural networks, and estimating net accuracy, net loss, and/or RMSE for the successive training, validation, and testing steps
  • Retraining and creation for image labeling, object identification, regression classification, and text recognition

Machine and Deep Learning Using MATLAB is a useful and highly comprehensive resource on the subject for professionals, advanced students, and researchers who have some familiarity with MATLAB and are situated in engineering and scientific fields, who wish to gain mastery over the software and its numerous applications.

Table of contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Preface
  5. About the Companion Website
  6. 1 Unsupervised Machine Learning (ML) Techniques
    1. Introduction
    2. Selection of the Right Algorithm in ML
    3. Classical Multidimensional Scaling of Predictors Data
    4. Principal Component Analysis (PCA)
    5. k-Means Clustering
      1. Distance Metrics: Locations of Cluster Centroids
      2. Replications
    6. Gaussian Mixture Model (GMM) Clustering
      1. Optimum Number of GMM Clusters
    7. Observations and Clusters Visualization
    8. Evaluating Cluster Quality
      1. Silhouette Plots
    9. Hierarchical Clustering
      1. Step 1 – Determine Hierarchical Structure
      2. Step 2 – Divide Hierarchical Tree into Clusters
    10. PCA and Clustering: Wine Quality
    11. Feature Selection Using Laplacian (fsulaplacian) for Unsupervised Learning
    12. CHW 1.1 The Iris Flower Features Data
    13. CHW 1.2 The Ionosphere Data Features
    14. CHW 1.3 The Small Car Data
    15. CHW 1.4 Seeds Features Data
  7. 2 ML Supervised Learning: Classification Models
    1. Fitting Data Using Different Classification Models
      1. Customizing a Model
      2. Creating Training and Test Datasets
      3. Predicting the Response
      4. Evaluating the Classification Model
    2. KNN Model for All Categorical or All Numeric Data Type
      1. KNN Model: Heart Disease Numeric Data
      2. Viewing the Fitting Model Properties
      3. The Fitting Model: Number of Neighbors and Weighting Factor
      4. The Cost Penalty of the Fitting Model
      5. KNN Model: Red Wine Data
    3. Using MATLAB Classification Learner
    4. Binary Decision Tree Model for Multiclass Classification of All Data Types
      1. Classification Tree Model: Heart Disease Numeric Data Types
      2. Classification Tree Model: Heart Disease All Predictor Data Types
    5. Naïve Bayes Classification Model for All Data Types
      1. Fitting Heart Disease Numeric Data to Naïve Bayes Model
      2. Fitting Heart Disease All Data Types to Naïve Bayes Model
    6. Discriminant Analysis (DA) Classifier for Numeric Predictors Only
      1. Discriminant Analysis (DA): Heart Disease Numeric Predictors
    7. Support Vector Machine (SVM) Classification Model for All Data Types
      1. Properties of SVM Model
      2. SVM Classification Model: Heart Disease Numeric Data Types
      3. SVM Classification Model: Heart Disease All Data Types
    8. Multiclass Support Vector Machine (fitcecoc) Model
      1. Multiclass Support Vector Machines Model: Red Wine Data
    9. Binary Linear Classifier (fitclinear) to High-Dimensional Data
      1. CHW 2.1 Mushroom Edibility Data
      2. CHW 2.2 1994 Adult Census Income Data
      3. CHW 2.3 White Wine Classification
      4. CHW 2.4 Cardiac Arrhythmia Data
      5. CHW 2.5 Breast Cancer Diagnosis
  8. 3 Methods of Improving ML Predictive Models
    1. Accuracy and Robustness of Predictive Models
      1. Evaluating a Model: Cross-Validation
      2. Cross-Validation Tune-up Parameters
      3. Partition with K-Fold: Heart Disease Data Classification
    2. Reducing Predictors: Feature Transformation and Selection
      1. Factor Analysis
      2. Feature Transformation and Factor Analysis: Heart Disease Data
      3. Feature Selection
      4. Feature Selection Using predictorImportance Function: Health Disease Data
      5. Sequential Feature Selection (SFS): sequentialfs Function with Model Error Handler
    3. Accommodating Categorical Data: Creating Dummy Variables
      1. Feature Selection with Categorical Heart Disease Data
    4. Ensemble Learning
      1. Creating Ensembles: Heart Disease Data
      2. Ensemble Learning: Wine Quality Classification
      3. Improving fitcensemble Predictive Model: Abalone Age Prediction
      4. Improving fitctree Predictive Model with Feature Selection (FS): Credit Ratings Data
      5. Improving fitctree Predictive Model with Feature Transformation (FT): Credit Ratings Data
    5. Using MATLAB Regression Learner
      1. Feature Selection and Feature Transformation Using Regression Learner App
    6. Feature Selection Using Neighborhood Component Analysis (NCA) for Regression: Big Car Data
    7. CHW 3.1 The Ionosphere Data
    8. CHW 3.2 Sonar Dataset
    9. CHW 3.3 White Wine Classification
    10. CHW 3.4 Small Car Data (Regression Case)
  9. 4 Methods of ML Linear Regression
    1. Introduction
    2. Linear Regression Models
      1. Fitting Linear Regression Models Using fitlm Function
      2. How to Organize the Data?
      3. Results Visualization: Big Car Data
      4. Fitting Linear Regression Models Using fitglm Function
    3. Nonparametric Regression Models
      1. fitrtree Nonparametric Regression Model: Big Car Data
      2. Support Vector Machine, fitrsvm, Nonparametric Regression Model: Big Car Data
      3. Nonparametric Regression Model: Gaussian Process Regression (GPR)
    4. Regularized Parametric Linear Regression
      1. Ridge Linear Regression: The Penalty Term
      2. Fitting Ridge Regression Models
      3. Predicting Response Using Ridge Regression Models
      4. Determining Ridge Regression Parameter, λ
      5. The Ridge Regression Model: Big Car Data
      6. The Ridge Regression Model with Optimum λ: Big Car Data
      7. Regularized Parametric Linear Regression Model: Lasso
    5. Stepwise Parametric Linear Regression
      1. Fitting Stepwise Linear Regression
      2. How to Specify stepwiselm Model?
      3. Stepwise Linear Regression Model: Big Car Data
    6. CHW 4.1 Boston House Price
    7. CHW 4.2 The Forest Fires Data
    8. CHW 4.3 The Parkinson’s Disease Telemonitoring Data
    9. CHW 4.4 The Car Fuel Economy Data
  10. 5 Neural Networks
    1. Introduction
    2. Feed-Forward Neural Networks
    3. Feed-Forward Neural Network Classification
    4. Feed-Forward Neural Network Regression
      1. Numeric Data: Dummy Variables
    5. Neural Network Pattern Recognition (nprtool) Application
    6. Command-Based Feed-Forward Neural Network Classification: Heart Data
    7. Neural Network Regression (nftool)
    8. Command-Based Feed-Forward Neural Network Regression: Big Car Data
    9. Training the Neural Network Regression Model Using fitrnet Function: Big Car Data
    10. Finding the Optimum Regularization Strength for Neural Network Using Cross-Validation: Big Car Data
    11. Custom Hyperparameter Optimization in Neural Network Regression: Big Car Data
    12. CHW 5.1 Mushroom Edibility Data
    13. CHW 5.2 1994 Adult Census Income Data
    14. CHW 5.3 Breast Cancer Diagnosis
    15. CHW 5.4 Small Car Data (Regression Case)
    16. CHW 5.5 Boston House Price
  11. 6 Pretrained Neural Networks: Transfer Learning
    1. Deep Learning: Image Networks
    2. Data Stores in MATLAB
    3. Image and Augmented Image Datastores
    4. Accessing an Image File
    5. Retraining: Transfer Learning for Image Recognition
    6. Convolutional Neural Network (CNN) Layers: Channels and Activations
      1. Convolution 2-D Layer Features via Activations
      2. Extraction and Visualization of Activations
      3. A 2-D (or 2-D Grouped) Convolutional Layer
    7. Features Extraction for Machine Learning
      1. Image Features in Pretrained Convolutional Neural Networks (CNNs)
      2. Classification with Machine Learning
      3. Feature Extraction for Machine Learning: Flowers
      4. Pattern Recognition Network Generation
      5. Machine Learning Feature Extraction: Spectrograms
    8. Network Object Prediction Explainers
      1. Occlusion Sensitivity
      2. imageLIME Features Explainer
      3. gradCAM Features Explainer
    9. HCW 6.1 CNN Retraining for Round Worms Alive or Dead Prediction
    10. HCW 6.2 CNN Retraining for Food Images Prediction
    11. HCW 6.3 CNN Retraining for Merchandise Data Prediction
    12. HCW 6.4 CNN Retraining for Musical Instrument Spectrograms Prediction
    13. HCW 6.5 CNN Retraining for Fruit/Vegetable Varieties Prediction
  12. 7 A Convolutional Neural Network (CNN) Architecture and Training
    1. A Simple CNN Architecture: The Land Satellite Images
      1. Displaying Satellite Images
    2. Training Options
      1. Mini Batches
      2. Learning Rates
      3. Gradient Clipping
      4. Algorithms
    3. Training a CNN for Landcover Dataset
    4. Layers and Filters
    5. Filters in Convolution Layers
    6. Viewing Filters: AlexNet Filters
    7. Validation Data
      1. Using shuffle Function
    8. Improving Network Performance
      1. Training Algorithm Options
      2. Training Data
      3. Architecture
    9. Image Augmentation: The Flowers Dataset
    10. Directed Acyclic Graphs Networks
    11. Deep Network Designer (DND)
    12. Semantic Segmentation
      1. Analyze Training Data for Semantic Segmentation
      2. Create a Semantic Segmentation Network
      3. Train and Test the Semantic Segmentation Network
    13. HCW 7.1 CNN Creation for Round Worms Alive or Dead Prediction
    14. HCW 7.2 CNN Creation for Food Images Prediction
    15. HCW 7.3 CNN Creation for Merchandise Data Prediction
    16. HCW 7.4 CNN Creation for Musical Instrument Spectrograms Prediction
    17. HCW 7.5 CNN Creation for Chest X-ray Prediction
    18. HCW 7.6 Semantic Segmentation Network for CamVid Dataset
  13. 8 Regression Classification: Object Detection
    1. Preparing Data for Regression
      1. Modification of CNN Architecture from Classification to Regression
      2. Root-Mean-Square Error
      3. AlexNet-Like CNN for Regression: Hand-Written Synthetic Digit Images
      4. A New CNN for Regression: Hand-Written Synthetic Digit Images
    2. Deep Network Designer (DND) for Regression
      1. Loading Image Data
      2. Generating Training Data
      3. Creating a Network Architecture
      4. Importing Data
      5. Training the Network
      6. Test Network
    3. YOLO Object Detectors
      1. Object Detection Using YOLO v4
      2. COCO-Based Creation of a Pretrained YOLO v4 Object Detector
      3. Fine-Tuning of a Pretrained YOLO v4 Object Detector
      4. Evaluating an Object Detector
    4. Object Detection Using R-CNN Algorithms
      1. R-CNN
      2. Fast R-CNN
      3. Faster R-CNN
    5. Transfer Learning (Re-Training)
    6. R-CNN Creation and Training
      1. Fast R-CNN Creation and Training
      2. Faster R-CNN Creation and Training
    7. evaluateDetectionPrecision Function for Precision Metric
    8. evaluateDetectionMissRate for Miss Rate Metric
    9. HCW 8.1 Testing yolov4ObjectDetector and fasterRCNN Object Detector
    10. HCW 8.2 Creation of Two CNN-based yolov4ObjectDetectors
    11. HCW 8.3 Creation of GoogleNet-Based Fast R-CNN Object Detector
    12. HCW 8.4 Creation of a GoogleNet-Based Faster R-CNN Object Detector
    13. HCW 8.5 Calculation of Average Precision and Miss Rate Using GoogleNet-Based Faster R-CNN Object Detector
    14. HCW 8.6 Calculation of Average Precision and Miss Rate Using GoogleNet-Based yolov4 Object Detector
    15. HCW 8.7 Faster RCNN-based Car Objects Prediction and Calculation of Average Precision for Training and Test Data
  14. 9 Recurrent Neural Network (RNN)
    1. Long Short-Term Memory (LSTM) and BiLSTM Network
    2. Train LSTM RNN Network for Sequence Classification
    3. Improving LSTM RNN Performance
      1. Sequence Length
    4. Classifying Categorical Sequences
    5. Sequence-to-Sequence Regression Using Deep Learning: Turbo Fan Data
    6. Classify Text Data Using Deep Learning: Factory Equipment Failure Text Analysis – 1
    7. Classify Text Data Using Deep Learning: Factory Equipment Failure Text Analysis – 2
    8. Word-by-Word Text Generation Using Deep Learning – 1
    9. Word-by-Word Text Generation Using Deep Learning – 2
    10. Train Network for Time Series Forecasting Using Deep Network Designer (DND)
    11. Train Network with Numeric Features
    12. HCW 9.1 Text Classification: Factory Equipment Failure Text Analysis
    13. HCW 9.2 Text Classification: Sentiment Labeled Sentences Data Set
    14. HCW 9.3 Text Classification: Netflix Titles Data Set
    15. HCW 9.4 Text Regression: Video Game Titles Data Set
    16. HCW 9.5 Multivariate Classification: Mill Data Set
    17. HCW 9.6 Word-by-Word Text Generation Using Deep Learning
  15. 10 Image/Video-Based Apps
    1. Image Labeler (IL) App
      1. Creating ROI Labels
      2. Creating Scene Labels
      3. Label Ground Truth
      4. Export Labeled Ground Truth
    2. Video Labeler (VL) App: Ground Truth Data Creation, Training, and Prediction
    3. Ground Truth Labeler (GTL) App
    4. Running/Walking Classification with Video Clips using LSTM
    5. Experiment Manager (EM) App
    6. Image Batch Processor (IBP) App
    7. HCW 10.1 Cat Dog Video Labeling, Training, and Prediction – 1
    8. HCW 10.2 Cat Dog Video Labeling, Training, and Prediction – 2
    9. HCW 10.3 EM Hyperparameters of CNN Retraining for Merchandise Data Prediction
    10. HCW 10.4 EM Hyperparameters of CNN Retraining for Round Worms Alive or Dead Prediction
    11. HCW 10.5 EM Hyperparameters of CNN Retraining for Food Images Prediction
  16. Appendix A Useful MATLAB Functions
    1. A.1 Data Transfer from an External Source into MATLAB
    2. A.2 Data Import Wizard
    3. A.3 Table Operations
    4. A.4 Table Statistical Analysis
    5. A.5 Access to Table Variables (Column Titles)
    6. A.6 Merging Tables with Mixed Columns and Rows
    7. A.7 Data Plotting
    8. A.8 Data Normalization
    9. A.9 How to Scale Numeric Data Columns to Vary Between 0 and 1
    10. A.10 Random Split of a Matrix into a Training and Test Set
    11. A.11 Removal of NaN Values from a Matrix
    12. A.12 How to Calculate the Percent of Truly Judged Class Type Cases for a Binary Class Response
    13. A.13 Error Function m-file
    14. A.14 Conversion of Categorical into Numeric Dummy Matrix
    15. A.15 evaluateFit2 Function
    16. A.16 showActivationsForChannel Function
    17. A.17 upsampLowRes Function
    18. A.18A preprocessData function
    19. A.18B preprocessData2 function
    20. A.19 processTurboFanDataTrain function
    21. A.20 processTurboFanDataTest Function
    22. A.21 preprocessText Function
    23. A.22 documentGenerationDatastore Function
    24. A.23 subset Function for an Image Data Store Partition
  17. Index
  18. End User License Agreement

Product information

  • Title: Machine and Deep Learning Using MATLAB
  • Author(s): Kamal I. M. Al-Malah
  • Release date: October 2023
  • Publisher(s): Wiley
  • ISBN: 9781394209088