更新时间:2021-07-02 15:10:42
coverpage
Title Page
scikit-learn Cookbook
Second Edition
Copyright
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
Who this book is for
What you need for this book
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
High-Performance Machine Learning – NumPy
Introduction
NumPy basics
How to do it...
The shape and dimension of NumPy arrays
NumPy broadcasting
Initializing NumPy arrays and dtypes
Indexing
Boolean arrays
Arithmetic operations
NaN values
How it works...
Loading the iris dataset
Getting ready
Viewing the iris dataset
There's more...
Viewing the iris dataset with Pandas
Plotting with NumPy and matplotlib
A minimal machine learning recipe – SVM classification
Introducing cross-validation
Putting it all together
Machine learning overview – classification versus regression
The purpose of scikit-learn
Supervised versus unsupervised
Quick SVC – a classifier and regressor
Making a scorer
Linear versus nonlinear
Black box versus not
Interpretability
A pipeline
Pre-Model Workflow and Pre-Processing
Creating sample data for toy analysis
Creating a regression dataset
Creating an unbalanced classification dataset
Creating a dataset for clustering
Scaling data to the standard normal distribution
Creating binary features through thresholding
Sparse matrices
The fit method
Working with categorical variables