Magicode logo
Magicode
0

06 Figure Code

56 min read

Many of the figures used throughout this text are created in-place by code that appears in print. In a few cases, however, the required code is long enough (or not immediately relevant enough) that we instead put it here for reference.



Broadcasting

Figure Context


png

Aggregation and Grouping

Figures from the chapter on aggregation and grouping

Split-Apply-Combine


png

What Is Machine Learning?


Classification Example Figures

Figure context

The following code generates the figures from the Classification section.


Classification Example Figure 1

png

Classification Example Figure 2

png

Classification Example Figure 3

png

Regression Example Figures

Figure Context

The following code generates the figures from the regression section.


Regression Example Figure 1

png

Regression Example Figure 2

png

Regression Example Figure 3

png

Regression Example Figure 4

png

Clustering Example Figures

Figure context

The following code generates the figures from the clustering section.


Clustering Example Figure 1

png

Clustering Example Figure 2

png

Dimensionality Reduction Example Figures

Figure context

The following code generates the figures from the dimensionality reduction section.

Dimensionality Reduction Example Figure 1

png

Dimensionality Reduction Example Figure 2

png

Introducing Scikit-Learn

Features and Labels Grid

The following is the code generating the diagram showing the features matrix and target array.


png

Hyperparameters and Model Validation

Cross-Validation Figures


2-Fold Cross-Validation

png

5-Fold Cross-Validation

png

Overfitting and Underfitting



Bias-Variance Tradeoff

png

Bias-Variance Tradeoff Metrics

png

Validation Curve

png

Learning Curve

png

Gaussian Naive Bayes

Gaussian Naive Bayes Example

Figure Context


png

Linear Regression

Gaussian Basis Functions

Figure Context


png

Random Forests

Helper Code

The following will create a module helpers_05_08.py which contains some tools used in In-Depth: Decision Trees and Random Forests.


Overwriting helpers_05_08.py

Decision Tree Example


png

Decision Tree Levels


png

Decision Tree Overfitting


png

Principal Component Analysis

Principal Components Rotation




png

Digits Pixel Components



png

Digits PCA Components


png

Manifold Learning

LLE vs MDS Linkages




png

K-Means

Expectation-Maximization

Figure Context

The following figure shows a visual depiction of the Expectation-Maximization approach to K Means:


png

Interactive K-Means

The following script uses IPython's interactive widgets to demonstrate the K-means algorithm interactively. Run this within the IPython notebook to explore the expectation maximization algorithm for computing K Means.


png

Gaussian Mixture Models

Covariance Type

Figure Context


Discussion

コメントにはログインが必要です。