更新时间:2021-07-02 19:48:05
coverpage
Title Page
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Why subscribe?
Customer Feedback
Dedication
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
A Taste of Machine Learning
Getting started with machine learning
Problems that machine learning can solve
Getting started with Python
Getting started with OpenCV
Installation
Getting the latest code for this book
Getting to grips with Python's Anaconda distribution
Installing OpenCV in a conda environment
Verifying the installation
Getting a glimpse of OpenCV's ML module
Summary
Working with Data in OpenCV and Python
Understanding the machine learning workflow
Dealing with data using OpenCV and Python
Starting a new IPython or Jupyter session
Dealing with data using Python's NumPy package
Importing NumPy
Understanding NumPy arrays
Accessing single array elements by indexing
Creating multidimensional arrays
Loading external datasets in Python
Visualizing the data using Matplotlib
Importing Matplotlib
Producing a simple plot
Visualizing data from an external dataset
Dealing with data using OpenCV's TrainData container in C++
First Steps in Supervised Learning
Understanding supervised learning
Having a look at supervised learning in OpenCV
Measuring model performance with scoring functions
Scoring classifiers using accuracy precision and recall
Scoring regressors using mean squared error explained variance and R squared
Using classification models to predict class labels
Understanding the k-NN algorithm
Implementing k-NN in OpenCV
Generating the training data
Training the classifier
Predicting the label of a new data point
Using regression models to predict continuous outcomes
Understanding linear regression
Using linear regression to predict Boston housing prices
Loading the dataset
Training the model
Testing the model
Applying Lasso and ridge regression
Classifying iris species using logistic regression
Understanding logistic regression
Loading the training data
Making it a binary classification problem
Inspecting the data
Splitting the data into training and test sets
Testing the classifier
Representing Data and Engineering Features
Understanding feature engineering
Preprocessing data
Standardizing features
Normalizing features
Scaling features to a range
Binarizing features
Handling the missing data
Understanding dimensionality reduction
Implementing Principal Component Analysis (PCA) in OpenCV
Implementing Independent Component Analysis (ICA)
Implementing Non-negative Matrix Factorization (NMF)
Representing categorical variables
Representing text features
Representing images
Using color spaces
Encoding images in RGB space
Encoding images in HSV and HLS space
Detecting corners in images
Using the Scale-Invariant Feature Transform (SIFT)
Using Speeded Up Robust Features (SURF)
Using Decision Trees to Make a Medical Diagnosis