Week 44: Dimensionality Reduction, PCA and Clustering. Decision Trees
Contents
Overview of week 44
Digression First
A short Discussion of Project 2
Learning Rate and more
Thursday, Principal Component Analysis
A kind of Bird's view on PCA
Thursday: Clustering and Unsupervised Learning
Basic Idea of the \( k \)-means Clustering Algorithm
The \( k \)-means Algorithm
Basic Math of the \( k \)-means Algorithm
Within Cluster Point Scatter
More Details
Total Cluster Variance
The \( k \)-means Clustering Algorithm
Summarizing
Writing our own Code, the Data Set
Implementing the \( k \)-means Algorithm
Plotting
Continuing
Wrapping it up
Decision trees, overarching aims
Basics of a tree
A Sketch of a Tree, Regression problem
A Sketch of a Tree, Classification problem
A typical Decision Tree with its pertinent Jargon, Classification Problem
General Features
How do we set it up?
Decision trees and Regression
Building a tree, regression
A top-down approach, recursive binary splitting
Making a tree
Pruning the tree
Cost complexity pruning
Schematic Regression Procedure
A Classification Tree
Growing a classification tree
Classification tree, how to split nodes
Visualizing the Tree, Classification
Visualizing the Tree, The Moons
Other ways of visualizing the trees
Printing out as text
Algorithms for Setting up Decision Trees
The CART algorithm for Classification
The CART algorithm for Regression
Computing the Gini index
Simple Python Code to read in Data and perform Classification
Computing the Gini Factor
Entropy and the ID3 algorithm
Cancer Data again now with Decision Trees and other Methods
Another example, the moons again
Playing around with regions
Regression trees
Final regressor code
Pros and cons of trees, pros
Disadvantages
Ensemble Methods: From a Single Tree to Many Trees and Extreme Boosting, Meet the Jungle of Methods
An Overview of Ensemble Methods
Bagging
More bagging
Simple Voting Example, head or tail
Using the Voting Classifier
Please, not the moons again! Voting and Bagging
Bagging Examples
Making your own Bootstrap: Changing the Level of the Decision Tree
A Sketch of a Tree, Classification problem
«
1
...
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
65
»