← Open Source
JWarmenhoven

ISLR-python

An Introduction to Statistical Learning (James, Witten, Hastie, Tibshirani, 2013): Python code.

TutorialsML/AI fundamentalsJupyter Notebook
Open on GitHub
Momentum
+0stars in 24 hours0.0%
4.42k
Stars
2.38k
Forks
+0
This week
2
Contributors
Created 2015-06-14 · Updated 2026-10-14 · #7613 today
Top developers
JWarmenhovenNJannasch

JWarmenhoven/ISLR-python is ranked 7,613 with 4,415 stars.

Same-category comparison

JWarmenhoven/ISLR-python is ranked 7,613 among these 8 peers; zotroneneis/machine_learning_basics is ranked 7,612.

Same-category comparison
NameRankMetrics
hunkim/DeepLearningZeroToAll7,591
Language:
Jupyter Notebook
Stars:
4,483
Forks:
2,593
Description:
TensorFlow Basic Tutorial Labs.
Kyubyong/transformer7,593
Language:
Python
Stars:
4,477
Forks:
1,304
Description:
A TensorFlow Implementation of the Transformer: Attention Is All You Need.
Azure/MachineLearningNotebooks7,604
Language:
Jupyter Notebook
Stars:
4,439
Forks:
2,570
Description:
Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft.
zotroneneis/machine_learning_basics7,612
Language:
Jupyter Notebook
Stars:
4,420
Forks:
833
Description:
Plain python implementations of basic machine learning algorithms.
decodingai-magazine/llm-twin-course7,620
Language:
Python
Stars:
4,390
Forks:
733
Description:
🤖 𝗟𝗲𝗮𝗿𝗻 for 𝗳𝗿𝗲𝗲 how to 𝗯𝘂𝗶𝗹𝗱 an end-to-end 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻-𝗿𝗲𝗮𝗱𝘆 𝗟𝗟𝗠 & 𝗥𝗔𝗚 𝘀𝘆𝘀𝘁𝗲𝗺 using 𝗟𝗟𝗠𝗢𝗽𝘀 best practices: ~ 𝘴𝘰𝘶𝘳𝘤𝘦 𝘤𝘰𝘥𝘦 + 12 𝘩𝘢𝘯𝘥𝘴-𝘰𝘯 𝘭𝘦𝘴𝘴𝘰𝘯𝘴.
panaversity/learn-agentic-ai7,621
Language:
Jupyter Notebook
Stars:
4,385
Forks:
1,009
Description:
Learn Agentic AI using Dapr Agentic Cloud Ascent (DACA) Design Pattern and Agent-Native Cloud Technologies: OpenAI Agents SDK, Memory, MCP, A2A, Knowledge Graphs, Dapr, Rancher Desktop, and Kubernetes.
ahkarami/Deep-Learning-in-Production7,624
Stars:
4,378
Forks:
685
Description:
In this repository, I will share some useful notes and references about deploying deep learning-based models in production.
dsgiitr/d2l-pytorch7,625
Language:
Jupyter Notebook
Stars:
4,370
Forks:
1,232
Description:
This project reproduces the book Dive Into Deep Learning (https://d2l.ai/), adapting the code from MXNet into PyTorch.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageJupyter Notebook
CategoryTutorials
SubcategoryML/AI fundamentals
Stars4,415
Forks2,377
Contributors2
Created date2015-06-14
Updated date2026-10-14
Stars in 1 day0
Stars in 7 days0
Rank7,613
Previous rank7,746
Rank change133
7-day stars rank11,763
Previous 7-day stars rank18,094
7-day stars rank change6,331
Total stars rank3,166
Previous total stars rank3,164
Total stars rank change-2
CountrySweden
README summary

ISLR-python This repository contains Python code for a selection of tables, figures and LAB sections from the first edition of the book 'An Introduction to Statistical Learning with Applications in R' by James, Witten, Hastie, Tibshirani (2013). For **Bayesian data analysis** using PyMC3, take a look at this repository . **2018-01-15**: Minor updates to the repository due to changes/deprecations in several packages. The notebooks have been tested with these package versions . Thanks @lincolnfrias and @telescopeuser. **2016-08

-30**: Chapter 6: I included Ridge/Lasso regression code using the new python-glmnet library. This is a python wrapper for the Fortran library used in the *R* package *glmnet*. Chapter 3 - Linear Regression Chapter 4 - Classification Chapter 5 - Resampling Methods Chapter 6 - Linear Model Selection and Regularization Chapter 7 - Moving Beyond Linearity Chapter 8 - Tree-Based Methods Chapter 9 - Support Vector Machines Chapter 10 - Unsupervised Learning Extra: Misclassification rate simulation - SVM and Logistic Regression This great book gives a

thorough introduction to the field of Statistical/Machine Learning. The book is available for download (see link below), but I think this is one of those books that is definitely worth buying. The book contains sections with applications in R based on public datasets available for download or which are part of the R-package ISLR . Furthermore, there is a Stanford University online course based on this book and taught by the authors (See course catalogue for current schedule). Since

Python is my language of choice for data analysis, I decided to try and do some of the calculations and plots in Jupyter Notebooks using: pandas numpy scipy scikit-learn python-glmnet statsmodels patsy matplotlib seaborn It was a good way to learn more about Machine Learning in Python by creating these notebooks. I created some of the figures/tables of the chapters and worked through some LAB sections. At certain points I realize that it may look like I

tried too hard to make the output identical to the tables and R-plots in the book. But I did this to explore some details of the libraries mentioned above (mostly matplotlib and seaborn). Note that this repository is not a standalone tutorial and that you probably should have a copy of the book to follow along. Suggestions for improvement and help with unsolved issues are welcome! (2009) for an advanced treatment of these topics. An Introduction to Statistical Learning

with Applications in R , Springer Science+Business Media, New York. An Introduction to Statistical Learning with Applications in R, Second Edition , Springer Science+Business Media, New York. Elements of Statistical Learning , Second Edition, Springer Science+Business Media, New York.

Frequently asked questions

How many stars and forks are recorded?

JWarmenhoven/ISLR-python has 4,415 stars and 2,377 forks.

What is the repository rank?

JWarmenhoven/ISLR-python is ranked 7,613.

What language and category are recorded?

JWarmenhoven/ISLR-python has 4,415 stars, uses Jupyter Notebook and belongs to Tutorials.

Which repository is closest in rank?

JWarmenhoven/ISLR-python is compared with zotroneneis/machine_learning_basics, ranked 7,612 with 4,420 stars.

README

ISLR-python

This repository contains Python code for a selection of tables, figures and LAB sections from the first edition of the book 'An Introduction to Statistical Learning with Applications in R' by James, Witten, Hastie, Tibshirani (2013).

For Bayesian data analysis using PyMC3, take a look at this repository.

2018-01-15:

Minor updates to the repository due to changes/deprecations in several packages. The notebooks have been tested with these package versions. Thanks @lincolnfrias and @telescopeuser.

2016-08-30:

Chapter 6: I included Ridge/Lasso regression code using the new python-glmnet library. This is a python wrapper for the Fortran library used in the R package glmnet.

Chapter 3 - Linear Regression

Chapter 4 - Classification

Chapter 5 - Resampling Methods

Chapter 6 - Linear Model Selection and Regularization

Chapter 7 - Moving Beyond Linearity

Chapter 8 - Tree-Based Methods

Chapter 9 - Support Vector Machines

Chapter 10 - Unsupervised Learning

Extra: Misclassification rate simulation - SVM and Logistic Regression

This great book gives a thorough introduction to the field of Statistical/Machine Learning. The book is available for download (see link below), but I think this is one of those books that is definitely worth buying. The book contains sections with applications in R based on public datasets available for download or which are part of the R-package ISLR. Furthermore, there is a Stanford University online course based on this book and taught by the authors (See course catalogue for current schedule).

Since Python is my language of choice for data analysis, I decided to try and do some of the calculations and plots in Jupyter Notebooks using:

  • pandas
  • numpy
  • scipy
  • scikit-learn
  • python-glmnet
  • statsmodels
  • patsy
  • matplotlib
  • seaborn

It was a good way to learn more about Machine Learning in Python by creating these notebooks. I created some of the figures/tables of the chapters and worked through some LAB sections. At certain points I realize that it may look like I tried too hard to make the output identical to the tables and R-plots in the book. But I did this to explore some details of the libraries mentioned above (mostly matplotlib and seaborn). Note that this repository is not a standalone tutorial and that you probably should have a copy of the book to follow along. Suggestions for improvement and help with unsolved issues are welcome! See Hastie et al. (2009) for an advanced treatment of these topics.

References:

James, G., Witten, D., Hastie, T., Tibshirani, R. (2013). An Introduction to Statistical Learning with Applications in R, Springer Science+Business Media, New York. https://www.statlearning.com/

James, G., Witten, D., Hastie, T., Tibshirani, R. (2021). An Introduction to Statistical Learning with Applications in R, Second Edition, Springer Science+Business Media, New York. https://www.statlearning.com/

Hastie, T., Tibshirani, R., Friedman, J. (2009). Elements of Statistical Learning, Second Edition, Springer Science+Business Media, New York. http://statweb.stanford.edu/~tibs/ElemStatLearn/

Nearby in the ranking
Similar items