Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/maitbayev/the-elements-of-statistical-learning

My notes and codes (jupyter notebooks) for the "The Elements of Statistical Learning" by Trevor Hastie, Robert Tibshirani and Jerome Friedman
https://github.com/maitbayev/the-elements-of-statistical-learning

jupyter-notebook machine-learning python python3 statistical-learning statistics textbook

Last synced: 24 days ago
JSON representation

My notes and codes (jupyter notebooks) for the "The Elements of Statistical Learning" by Trevor Hastie, Robert Tibshirani and Jerome Friedman

Lists

README

        

# Jupyter notebooks for the book "The Elements of Statistical Learning".

This repository contains Jupyter notebooks implementing the algorithms found in the book, proofs and summary of the textbook.

#### Requirements

- jupyter
- pandas
- numpy
- matplotlib
- scipy
- tensorflow 2 - temporarily until I have a lot of free time to implement them from scratch and it is used only in Chapter 11.

#### Table of Contents
- Chapter 2
* [2.3 Least Squares and Nearest Neighbors](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.3-least-squares-and-nearest-neighbors.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.3-least-squares-and-nearest-neighbors.ipynb))
* [2.4 Statistical Decision Theory](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.4-statistical-decision-theory.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.4-statistical-decision-theory.ipynb))
* [2.5 Local Methods in High Dimensions](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.5-local-methods-in-high-dimensions.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.5-local-methods-in-high-dimensions.ipynb))
* [2.6 Statistical Models, Supervised Learning and Function Approximation](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.6-statistical-models-supervised-learning-and-function-approximation.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.6-statistical-models-supervised-learning-and-function-approximation.ipynb))
* [2.7 Structured Regression Models](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.7-structured-regression-models.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.7-structured-regression-models.ipynb))
* [2.8 Classes of Restricted Estimators](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.8-classes-of-restricted-estimators.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.8-classes-of-restricted-estimators.ipynb))
* [2.9 Model Selection and the Bias-Variance Tradeoff](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.9-model-selection-and-the-bias-variance-tradeoff.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-02/2.9-model-selection-and-the-bias-variance-tradeoff.ipynb))

- Chapter 3
* [3.1 Introduction](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.1-introduction.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.1-introduction.ipynb))
* [3.2 Linear Regression Models and Least Squares](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2-linear-regression-models-and-least-squares.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2-linear-regression-models-and-least-squares.ipynb))
* [3.2.1 Example Prostate Cancer](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.1-example-prostate-cancer.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.1-example-prostate-cancer.ipynb))
* [3.2.2 The Gauss–Markov Theorem](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.2-the-gauss-markov-theorem.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.2-the-gauss-markov-theorem.ipynb))
* [3.2.3 Multiple Regression From Simple Univariate Regression](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.3-multiple-regression-from-simple-multivariate-regression.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.3-multiple-regression-from-simple-multivariate-regression.ipynb))
* [3.2.4 Multiple Outputs](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.4-multiple-outputs.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.2.4-multiple-outputs.ipynb))
* [3.3 Subset Selection](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.3-subset-selection.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.3-subset-selection.ipynb))
* [3.4 Shrinkage Methods](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4-shrinkage-methods.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4-shrinkage-methods.ipynb))
* [3.4.1 Ridge Regression](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.1-ridge-regression.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.1-ridge-regression.ipynb))
* [3.4.2 The Lasso](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.2-the-lasso.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.2-the-lasso.ipynb))
* **TODO**: [3.4.3 Discussion: Subset Selection, Ridge Regression and the Lasso](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.4-discussion-subset-selection-ridge-regression-and-the-lasso.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.4-discussion-subset-selection-ridge-regression-and-the-lasso.ipynb))
* [3.4.4 Least Angle Regression](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.4-least-angle-regression.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.4.4-least-angle-regression.ipynb))
* [3.5 Methods Using Derived Input Directions](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.5-methods-using-derived-input-directions.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-03/3.5-methods-using-derived-input-directions.ipynb))

- Chapter 4
* [4.1 Introduction](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.1-introduction.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.1-introduction.ipynb))
* [4.2 Linear Regression of an Indicator Matrix](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.2-linear-regression-of-an-indicator-matrix.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.2-linear-regression-of-an-indicator-matrix.ipynb))
* [4.3 Linear Discriminant Analysis](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3-linear-discriminant-analysis.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3-linear-discriminant-analysis.ipynb))
* [4.3.1 Regularized Discriminant Analysis](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.1-regularized-discriminant-analysis.ipynb)
[nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.1-regularized-discriminant-analysis.ipynb))
* [4.3.2 Computations for LDA](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.2-computations-for-LDA.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.2-computations-for-LDA.ipynb))
* [4.3.3 Reduced-Rank Linear Discriminant Analysis](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.3-reduced-rank-linear-discriminant-analysis.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.3.3-reduced-rank-linear-discriminant-analysis.ipynb))
* [4.4 Logistic Regression](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4-logistic-regression.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4-logistic-regression.ipynb))
* [4.4.1 Fitting Logistic Regression Models](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.1-fitting-logistic-regression-models.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.1-fitting-logistic-regression-models.ipynb))
* [4.4.2 Example: South African Heart Disease](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.2-example-south-african-heart-disease.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.2-example-south-african-heart-disease.ipynb))
* [4.4.3 Quadratic Approximations and Inference](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.3-quadratic-approximations-and-inference.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.3-quadratic-approximations-and-inference.ipynb))
* [4.4.4 L1 Regularized Logistic Regression](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.4-L-1-regularized-logistic-regression.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-04/4.4.4-L-1-regularized-logistic-regression.ipynb))

- Chapter 11
* **WIP**: [11.7 Example: ZIP Code Data](https://github.com/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-11/11.7-example-zip-code-data.ipynb)
([nbviewer](https://nbviewer.jupyter.org/github/maitbayev/the-elements-of-statistical-learning/blob/master/chapter-11/11.7-example-zip-code-data.ipynb))