š”– Scriptorium
✦   LIBER   ✦

šŸ“

Machine Learning with the Raspberry Pi: Experiments with Data and Computer Vision

āœ Scribed by Donald J. Norris


Publisher
Apress
Year
2019
Tongue
English
Leaves
571
Series
Technology in Action
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Using the Pi Camera and a Raspberry Pi board, expand and replicate interesting machine learning (ML) experiments.
This book provides a solid overview of ML and a myriad of underlying topics to further explore. Non-technical discussions temper complex technical explanations to make the hottest and most complex topic in the hobbyist world of computing understandable and approachable.

Machine learning, also commonly referred to as deep learning (DL), is currently being integrated into a multitude of commercial products as well as widely being used in industrial, medical, and military applications. It is hard to find any modern human activity, which has not been "touched" by artificial intelligence (AI) applications. Building on the concepts first presented in Beginning Artificial Intelligence with the Raspberry Pi, you’ll go beyond simply understanding the concepts of AI into working with real machine learning experiments and applying practical deep learning concepts to experiments with the Pi board and computer vision.

What you learn with Machine Learning with the Raspberry Pi can then be moved on to other platforms to go even further in the world of AI and ML to better your hobbyist or commercial projects.

What You'll Learn
• Acquire a working knowledge of current ML
• Use the Raspberry Pi to implement ML techniques and algorithms
• Apply AI and ML tools and techniques to your own work projects and studies

Who This Book Is For
Engineers and scientists but also experienced makers and hobbyists. Motivated high school students who desire to learn about ML can benefit from this material with determination.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Chapter 1: Introduction to machine learning (ML) withĀ theĀ Raspberry Pi (RasPi)
RasPi introduction
Writing theĀ Raspbian Image toĀ aĀ micro SD card
Mandatory configurations
Optional configurations
Updating andĀ upgrading theĀ Raspbian distribution
Python virtual environment
Installing aĀ Python virtual environment
Installing dependencies
ML facts
ML basics
Linear prediction andĀ classification
Iris demonstration – Part 1
Iris demonstration – Part 2
Iris demonstration – Part 3
Chapter 2: Exploration ofĀ ML data models: Part 1
Installing OpenCV 4
Download OpenCV 4 source code
Building theĀ OpenCV software
Seaborn data visualization library
Scatter plot
Facet grid plot
Box plot
Strip plot
Violin plot
KDE plot
Pair plots
Underlying big principle
Linear regression
LR demonstration
Logistic regression
LogR model development
LogR demonstration
Naive Bayes
Brief review ofĀ theĀ Bayes’ theorem
Preparing data forĀ use by theĀ Naive Bayes model
Naive Bayes model example
Pros andĀ cons
Gaussian Naive Bayes
Gaussian Naive Bayes (GNB) demonstration
k-nearest neighbor (k-NN) model
KNN demonstration
Decision tree classifier
Decision tree algorithm
Information gain
Split criterion
Measuring information
Properties ofĀ entropy
Information gain example
Gini index
Simple Gini index example
Gain ratio
Intrinsic information
Definition ofĀ gain ratio
Decision tree classifier demonstration withĀ scikit-learn
Visualizing theĀ decision tree
Optimizing aĀ decision tree
Pros andĀ cons forĀ decision trees
Pros
Cons
Chapter 3: Exploration ofĀ ML data models: Part 2
Principal component analysis
PCA script discussion
PCA demonstration
When toĀ use PCA
Linear discriminant analysis
LDA script discussion
LDA demonstration
Comparison ofĀ PCA andĀ LDA
Support vector machines
SVM demonstration – Part 1
SVM demonstration – Part 2
Learning vector quantization
LVQ basic concepts
Euclidean distance
Best matching unit
Training codebook vectors
LVQ demonstration
Bagging andĀ random forests
Introduction toĀ bagging andĀ random forest
Bootstrap aggregation (bagging)
Random forest
Performance estimation andĀ variable importance
Bootstrap resampling demonstration
Bagging demonstration
Random forest demonstration
Chapter 4: Preparation forĀ deep learning
DL basics
Machine learning fromĀ data patterns
Linear classifier
Loss functions
Different types ofĀ loss functions
Optimizer algorithm
Deep dive into theĀ gradient descent algorithm
Artificial neural network
How ANNs are trained andĀ function
Practical ANN example
Complex ANN example
Modifying weight values
Practical ANN weight modification example
Some issues withĀ ANN learning
ANN Python demonstration – Part 1
ANN Python demonstration – Part 2
Chapter 5: Practical deep learning ANN demonstrations
Parts list
Recognizing handwritten number demonstration
Project history andĀ preparatory details
Adjusting theĀ input datasets
Interpreting ANN output data values
Creating anĀ ANN that does handwritten number recognition
Initial ANN training script demonstration
ANN test script demonstration
ANN test script demonstration using theĀ full training dataset
Recognizing your own handwritten numbers
Installing theĀ Pi Camera
Installing theĀ Pi Camera software
Handwritten number recognition demonstration
Handwritten number recognition using Keras
Introduction toĀ Keras
Installing Keras
Downloading theĀ dataset andĀ creating aĀ model
Chapter 6: CNN demonstrations
Parts list
Introduction toĀ theĀ CNN model
History andĀ evolution ofĀ theĀ CNN
Fashion MNIST demonstration
More complex Fashion MNIST demonstration
VGG Fashion MNIST demonstration
Jason’s Fashion MNIST demonstration
Chapter 7: Predictions using ANNs andĀ CNNs
Pima Indian Diabetes demonstration
Background forĀ theĀ Pima Indian Diabetes study
Preparing theĀ data
Using theĀ scikit-learn library withĀ Keras
Grid search withĀ Keras andĀ scikit-learn
Housing price regression predictor demonstration
Preprocessing theĀ data
The baseline model
Improved baseline model
Another improved baseline model
Predictions using CNNs
Univariate time series CNN model
Preprocessing theĀ dataset
Create aĀ CNN model
Multivariate time series CNN model
Multiple input series
Preprocessing theĀ dataset
Chapter 8: Predictions using CNNs andĀ MLPs forĀ medical research
Parts list
Downloading theĀ breast cancer histology Image dataset
Preparing theĀ project environment
Configuration script
Building theĀ dataset
Running theĀ build dataset script
The CNN model
Training andĀ testing script
Running theĀ training andĀ testing script
Evaluating theĀ results withĀ aĀ discussion ofĀ sensitivity, specificity, andĀ AUROC curves
What is sensitivity?
What is specificity?
What are theĀ differences between sensitivity andĀ specificity andĀ how are they used?
Using aĀ MLP model forĀ breast cancer prediction
Running theĀ MLP script
Chapter 9: Reinforcement learning
Markov decision process
Discounted future reward
Q-learning
Q-learning example
Manual Q-learning experiments
Q-learning demonstration withĀ aĀ Python script
Running theĀ script
Q-learning inĀ aĀ hostile environment demonstration
Running theĀ script andĀ evaluating theĀ results
Q-learning inĀ aĀ hostile environment withĀ aĀ priori knowledge demonstration
Running theĀ script andĀ evaluating theĀ results
Q-learning andĀ neural networks
Index

✦ Subjects


Machine Learning; Deep Learning; Reinforcement Learning; OpenCV; Python; Convolutional Neural Networks; Keras; Raspberry Pi; Q-Learning; Markov Decision Process


šŸ“œ SIMILAR VOLUMES


Machine Learning with the Raspberry Pi:
āœ Donald J. Norris šŸ“‚ Library šŸ“… 2020 šŸ› Apress 🌐 English

<p><p>Using the Pi Camera and a Raspberry Pi board, expand and replicate interesting machine learning (ML) experiments. This book provides a solid overview of ML and a myriad of underlying topics to further explore. Non-technical discussions temper complex technical explanations to make the hottest

Machine Learning with the Raspberry Pi:
āœ Donald J. Norris šŸ“‚ Library šŸ“… 2019 šŸ› Apress 🌐 English

<p>Using the Pi Camera and a Raspberry Pi board, expand and replicate interesting machine learning (ML) experiments.Ā  This book provides a solid overview of ML and a myriad of underlying topics to further explore. Non-technical discussions temper complex technical explanations to make the hottest an

Computer Vision with Maker Tech: Detecti
āœ Fabio Manganiello šŸ“‚ Library šŸ“… 2021 šŸ› Apress 🌐 English

<p>https://www.apress.com/gp/book/9781484268209</p> <p>Harness the untapped potential of combining a decentralized Internet of Things (IoT) with the ability to make predictions on real-world fuzzy data. This book covers the theory behind machine learning models and shows you how to program and asse

Raspberry Pi computer vision programming
āœ Pajankar, Ashwin šŸ“‚ Library šŸ“… 2015 šŸ› Packt Publishing 🌐 English

<p>This book is intended for novices, as well as seasoned Raspberry Pi and Python enthusiasts, who would like to explore the area of computer vision. Readers with very little programming or coding/scripting experience can create wonderful image processing and computer vision applications with relati