An Introduction to Statistical Learning,
The book: An Introduction to Statistical Learning, by G James, et. al. (2021). Available online:
https://hastie.su.domains/ISLR2/ISLRv2_website.pdf
Task 1: Recreate Fig 12.4 from the book for USArrest Data.
Comment (4 peices of information) on two different plots PCA visualization using two principal
components with and without scaling the data.
(Note: You can refer to the github repo I introduced at the beginning of the course.)
https://github.com/JWarmenhoven/ISLR-python in this github the chapter involved is chapter
10
Task 2: Separating concentric circles using PCA and KPCA 1.
Create a 1000 data points of two concentric circles, and plot data points from two circles in
color red and blue.
You can use the make_circles function from sklearn.dataset to do this.
make_circles(n_samples, random_state, noise, factor) use: n_samples = 1000, random_state =
123, noise = 0.1, factor = 0.2
1. Do PCA on the data and visualize PC decomposition using 2 PCs.
2. Implement Kernel PCA using RBF kernel. You can use KernelPCA from sklearn.decomposition
3. Do KPCA visualization using two Kernel PCs and compare with Linear PCA visualization. You
might want to try with different gamma for RBF. For example, case1: Gamma = 5, case2:
Gamma = 15.
4. Repeat 1-3 for half moon data.
Task 3: MNIST data classification using neural nets and CNN in pytorch.
1. Perform classification on MNIST data using fully connected neural nets.
https://towardsdatascience.com/handwritten-digit-mnist-pytorch-977b5338e627
2. Perform classification on MNIST data using convolutional neural nets.