# 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/

徐浪老师
- 粉丝: 9518
最新资源
- 基于STC12C5A60S2单片机开发的智能电动消防小车系统_自动寻火源_灭火_返库_计时功能_声音提示_2014山西省大学生电子设计竞赛07题项目_包含出库提示音_火警报警_灭火.zip
- 基于Proteus和AT89C51单片机的多功能电子琴仿真系统设计_包含矩阵键盘输入LCD1602实时显示LED音符指示独立按键音效切换的完整电子琴模拟_用于电子音乐教学演示.zip
- 基于Swift语言开发的QQ音乐iOS客户端完整开源项目_包含音乐播放器界面_歌曲搜索功能_歌词同步显示_本地音乐管理_播放列表创建_个性化推荐系统_夜间模式切换_用户登录注册_音.zip
- 同济大学软件工程专业软件工程管理与经济课程项目基于专有大语言模型的智能文本处理平台_文本摘要生成_批量文件处理_手动编辑_多角色协作审阅_高并发性能优化_政府企业端到端解决方案_.zip
- 活动策划与执行全流程数字化管理系统_晚会会展活动策划_商品设备费用明细管理_客户供应商信息管理_业务查询与财务核算_Excel数据导入导出_宏达数据库开发平台_专为活动承办公司设计.zip
- 外贸企业全流程信息化管理系统_进出口业务管理_外贸单证处理_客户关系维护_货运代理协同_财务结算统计_风险预警提示_适用于各类外贸公司进出口业务全生命周期管理_基于宏达数据库信息管.zip
- 视频采集:开启计算机视觉类项目的首要环节 视频采集作为计算机视觉类项目的初始关键步骤 计算机视觉类项目开展的第一站:视频采集工作 做好视频采集,迈出计算机视觉类项目第一步 视频采集:计算机视觉类项目启
- 基于VictoriaFreSh和ruby-lzma的高效多进程并行压缩工具EXtremeZip_支持目录树打包解包和字节流压缩解压缩_采用CBOR作为文件格式基础_提供类似tar和.zip
- 跨平台个性化桌面壁纸管理系统_实现多终端壁纸同步与智能切换_支持Windows_macOS_iOS_Android全平台覆盖_提供海量高清壁纸资源库_包含用户个性化定制功能_具备自.zip
- 刀具管理系统_企业刀具全生命周期管理_刀具入库登记_领用申请审批_使用归还跟踪_库存预警监控_损耗统计分析_报废处理记录_供应商信息管理_员工使用记录_单位信息维护_入库统计报.zip
- 基于Linux011内核思想设计的轻量级操作系统HJTOS_包含多任务调度内存管理驱动程序文件系统等核心功能_提供完整的操作系统学习框架和开发环境_采用BochsX86虚拟.zip
- 企业级人力资源综合管理系统_人力招聘_人事档案_人事异动_薪资管理_人力开发_日常应用_员工管理_工资发放_培训管理_绩效考核_员工调动_离职管理_复职管理_奖惩登记_证照提醒_生.zip
- 无线接收设备全生命周期智能管理系统_旅游培训公司无线设备接收器发射器借用归还维修报损统计管理_提供设备借出登记归还登记维修登记设备现状报损删除借出单打印功能_支持数据与Excel导.zip
- 面向对象软件开发中23种经典设计模式的完整实现与详细解析_工厂方法模式_抽象工厂模式_建造者模式_原型模式_单例模式_适配器模式_桥接模式_组合模式_装饰模式_外观模式_享元模式_.zip
- songlan666_crmworkspace_7244_1755584871015.zip
- 车险理赔全流程智能管理系统_适用于车辆保险公司的专业理赔管理软件_包含报案录入_查勘定损_核损理算_打印设置_配件管理等核心功能_具有快速辅助录入_操作简单_高效强大的特点_基于宏.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


