# ISLR-python
This repository contains Python code for a selection of tables, figures and LAB sections from the first edition of the book <A target="_blank" href='https://www.statlearning.com/'>'An Introduction to Statistical Learning with Applications in R'</A> by James, Witten, Hastie, Tibshirani (2013).<P>
For **Bayesian data analysis** using PyMC3, take a look at <A href='https://github.com/JWarmenhoven/DBDA-python'>this repository</A>.
**2018-01-15**:<BR>
Minor updates to the repository due to changes/deprecations in several packages. The notebooks have been tested with <A href='http://nbviewer.jupyter.org/github/JWarmenhoven/ISLR-python/blob/master/Notebooks/Python%20module%20versions.ipynb'>these package versions</A>. Thanks @lincolnfrias and @telescopeuser.
<P>
**2016-08-30**:<BR>
Chapter 6: I included Ridge/Lasso regression code using the new <A href='https://github.com/civisanalytics/python-glmnet'>python-glmnet</A> library. This is a python wrapper for the Fortran library used in the *R* package *glmnet*.
<P>
<IMG src='Notebooks/ISL%20Cover%202.jpg' height=20% width=20%> <P>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%203.ipynb'>Chapter 3 - Linear Regression</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%204.ipynb'>Chapter 4 - Classification</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%205.ipynb'>Chapter 5 - Resampling Methods</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%206.ipynb'>Chapter 6 - Linear Model Selection and Regularization</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%207.ipynb'>Chapter 7 - Moving Beyond Linearity</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%208.ipynb'>Chapter 8 - Tree-Based Methods</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%209.ipynb'>Chapter 9 - Support Vector Machines</A><BR>
<A href='http://nbviewer.ipython.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Chapter%2010.ipynb'>Chapter 10 - Unsupervised Learning</A><P>
<A href='http://nbviewer.jupyter.org/github/JWarmenhoven/ISL-python/blob/master/Notebooks/Simulate.expected.misclassification.rate.ipynb'>Extra: Misclassification rate simulation - SVM and Logistic Regression</A><P>
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 <A target="_blank" href="https://cran.r-project.org/web/packages/ISLR/index.html">R-package ISLR</A>. Furthermore, there is a Stanford University online course based on this book and taught by the authors (See <A target="_blank" href='https://www.edx.org/school/stanfordonline'>course catalogue</A> for current schedule).<P>
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 <STRONG>not a standalone tutorial</STRONG> 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.<P>
#### References:
James, G., Witten, D., Hastie, T., Tibshirani, R. (2013). <I>An Introduction to Statistical Learning with Applications in R</I>, Springer Science+Business Media, New York.
https://www.statlearning.com/
James, G., Witten, D., Hastie, T., Tibshirani, R. (2021). <I>An Introduction to Statistical Learning with Applications in R, Second Edition</I>, Springer Science+Business Media, New York.
https://www.statlearning.com/
Hastie, T., Tibshirani, R., Friedman, J. (2009). <I>Elements of Statistical Learning</I>, Second Edition, Springer Science+Business Media, New York.
http://statweb.stanford.edu/~tibs/ElemStatLearn/
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
ISLR python-python-python-python-python该存储库包含James、Witten、Hastie 和 Tibshirani 所著书籍《R 语言应用统计学习简介》 (2013 年)第一版中精选的表格、图表和 LAB 部分的 Python 代码。对于使用 PyMC3 进行贝叶斯数据分析,请查看此存储库。2018-01-15由于几个软件包的变更/弃用,对存储库进行了小幅更新。笔记本已使用这些软件包版本进行了测试。感谢@lincolnfrias 和@telescopeuser。2016-08-30第 6 章我使用新的python-glmnet库 包含了 Ridge/Lasso 回归代码。这是R包glmnet中使用的 Fortran 库的 python 包装器。第 3 章 - 线性回归第 4 章 - 分类第 5 章 - 重采样方法第 6 章 - 线性模型选择和正则化第 7 章 - 超越线性第 8 章 - 基于树的方法第 9 章 - 支持向量机第 10 章 - 无监督学习附加错误分类率模拟 - SVM 和 Logistic
资源推荐
资源详情
资源评论
收起资源包目录
统计学习简介 (James、Witten、Hastie、Tibshirani,2013)Python 代码.zip (37个子文件)
LICENSE.md 1KB
Notebooks
Chapter 5.ipynb 69KB
Python module versions.ipynb 2KB
Chapter 3.ipynb 1.11MB
Chapter 6.ipynb 239KB
Chapter 4.ipynb 267KB
Chapter 10.ipynb 549KB
Chapter 9.ipynb 342KB
Simulate.expected.misclassification.rate.ipynb 336KB
ISL Cover 2.jpg 105KB
Chapter 8.ipynb 1.13MB
Chapter 7.ipynb 402KB
Data
Hitters_y_train.csv 1KB
Caravan.csv 1.02MB
Smarket.csv 76KB
Advertising.csv 5KB
Auto.csv 18KB
USArrests.csv 1KB
Boston.csv 34KB
Khan_ytrain.csv 439B
Default.xlsx 452KB
NCI60_y.csv 913B
Carseats.csv 21KB
Heart.csv 19KB
Khan_xtrain.csv 1.44MB
Khan_xtest.csv 605KB
Khan_ytest.csv 138B
Hitters.csv 27KB
Hitters_y_test.csv 1KB
Hitters_X_train.csv 10KB
Credit.csv 26KB
Wage.csv 480KB
Hitters_X_test.csv 10KB
NCI60_X.csv 2.97MB
标签.txt 67B
资源内容.txt 947B
README.md 5KB
共 37 条
- 1
资源评论
徐浪老师
- 粉丝: 8058
- 资源: 7094
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Python 中数据结构和算法的最少示例.zip
- 全国大学生智能车竞赛:基于Arduino的智能车设计与实现
- Python SOAP 客户端.zip
- Python ODBC 桥.zip
- Python MIDI 库.zip
- Python for DevOps repo 包含有用的 Python 脚本,可供您学习并在日常 DevOps 自动化任务中实施 .zip
- Python API 包装器和库列表.zip
- Python - 与我的 YouTube 频道相关的脚本存储在这里,可以用任何版本的 Python 编写.zip
- PyClass 课程计划.zip
- Puppet 模块用于安装和管理 Python、pip、virtualenvs 和 Gunicorn 虚拟主机 .zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功