{"id":15026581,"url":"https://github.com/jwarmenhoven/islr-python","last_synced_at":"2025-04-12T01:55:27.024Z","repository":{"id":33763870,"uuid":"37419489","full_name":"JWarmenhoven/ISLR-python","owner":"JWarmenhoven","description":"An Introduction to Statistical Learning (James, Witten, Hastie, Tibshirani, 2013): Python code","archived":false,"fork":false,"pushed_at":"2022-10-27T09:23:52.000Z","size":21875,"stargazers_count":4309,"open_issues_count":3,"forks_count":2430,"subscribers_count":206,"default_branch":"master","last_synced_at":"2025-04-12T01:55:20.516Z","etag":null,"topics":["islr","islr-python","machine-learning","predictive-modeling","statistical-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JWarmenhoven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-14T16:14:00.000Z","updated_at":"2025-04-09T11:31:16.000Z","dependencies_parsed_at":"2022-07-30T22:37:56.661Z","dependency_job_id":null,"html_url":"https://github.com/JWarmenhoven/ISLR-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWarmenhoven%2FISLR-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWarmenhoven%2FISLR-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWarmenhoven%2FISLR-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWarmenhoven%2FISLR-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JWarmenhoven","download_url":"https://codeload.github.com/JWarmenhoven/ISLR-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505868,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["islr","islr-python","machine-learning","predictive-modeling","statistical-learning"],"created_at":"2024-09-24T20:04:44.073Z","updated_at":"2025-04-12T01:55:27.004Z","avatar_url":"https://github.com/JWarmenhoven.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ISLR-python\nThis repository contains Python code for a selection of tables, figures and LAB sections from the first edition of the book \u003cA target=\"_blank\" href='https://www.statlearning.com/'\u003e'An Introduction to Statistical Learning with Applications in R'\u003c/A\u003e by James, Witten, Hastie, Tibshirani (2013).\u003cP\u003e\n\n For **Bayesian data analysis** using PyMC3, take a look at \u003cA href='https://github.com/JWarmenhoven/DBDA-python'\u003ethis repository\u003c/A\u003e.\n\n**2018-01-15**:\u003cBR\u003e\nMinor updates to the repository due to changes/deprecations in several packages. The notebooks have been tested with \u003cA href='http://nbviewer.jupyter.org/github/JWarmenhoven/ISLR-python/blob/master/Notebooks/Python%20module%20versions.ipynb'\u003ethese package versions\u003c/A\u003e. Thanks @lincolnfrias and @telescopeuser.\n\u003cP\u003e\n\n**2016-08-30**:\u003cBR\u003e\nChapter 6: I included Ridge/Lasso regression code using the new \u003cA href='https://github.com/civisanalytics/python-glmnet'\u003epython-glmnet\u003c/A\u003e library. This is a python wrapper for the Fortran library used in the *R* package *glmnet*. \n\u003cP\u003e\n\n\u003cIMG src='Notebooks/ISL%20Cover%202.jpg' height=20% width=20%\u003e \u003cP\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%203.ipynb'\u003eChapter 3 - Linear Regression\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%204.ipynb'\u003eChapter 4 - Classification\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%205.ipynb'\u003eChapter 5 - Resampling Methods\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%206.ipynb'\u003eChapter 6 - Linear Model Selection and Regularization\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%207.ipynb'\u003eChapter 7 - Moving Beyond Linearity\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%208.ipynb'\u003eChapter 8 - Tree-Based Methods\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%209.ipynb'\u003eChapter 9 - Support Vector Machines\u003c/A\u003e\u003cBR\u003e\n\u003cA href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%2010.ipynb'\u003eChapter 10 - Unsupervised Learning\u003c/A\u003e\u003cP\u003e\n\u003cA href='http://nbviewer.jupyter.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Simulate.expected.misclassification.rate.ipynb'\u003eExtra: Misclassification rate simulation - SVM and Logistic Regression\u003c/A\u003e\u003cP\u003e\nThis 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 \u003cA target=\"_blank\" href=\"https://cran.r-project.org/web/packages/ISLR/index.html\"\u003eR-package ISLR\u003c/A\u003e. Furthermore, there is a Stanford University online course based on this book and taught by the authors (See \u003cA target=\"_blank\" href='https://www.edx.org/school/stanfordonline'\u003ecourse catalogue\u003c/A\u003e for current schedule).\u003cP\u003e\nSince 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:\n\n - pandas\n - numpy\n - scipy\n - scikit-learn\n - python-glmnet\n - statsmodels\n - patsy\n - matplotlib\n - seaborn\n\nIt 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 \u003cSTRONG\u003enot a standalone tutorial\u003c/STRONG\u003e and that you probably should have a copy of the book to follow along. Suggestions for improvement and help with unsolved issues are welcome!\nSee Hastie et al. (2009) for an advanced treatment of these topics.\u003cP\u003e \n\n#### References: \nJames, G., Witten, D., Hastie, T., Tibshirani, R. (2013). \u003cI\u003eAn Introduction to Statistical Learning with Applications in  R\u003c/I\u003e,  Springer Science+Business Media, New York.\nhttps://www.statlearning.com/\n\nJames, G., Witten, D., Hastie, T., Tibshirani, R. (2021). \u003cI\u003eAn Introduction to Statistical Learning with Applications in  R, Second Edition\u003c/I\u003e,  Springer Science+Business Media, New York.\nhttps://www.statlearning.com/\n\nHastie, T., Tibshirani, R., Friedman, J. (2009). \u003cI\u003eElements of Statistical Learning\u003c/I\u003e, Second Edition, Springer Science+Business Media, New York.\nhttp://statweb.stanford.edu/~tibs/ElemStatLearn/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwarmenhoven%2Fislr-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwarmenhoven%2Fislr-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwarmenhoven%2Fislr-python/lists"}