Skip to content
项目

关于

Solutions to labs and excercises from An Introduction to Statistical Learning, as Jupyter Notebooks.

科学与工程

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

ISL-python

An Introduction to Statistical Learning is a textbook by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani. Conceptual and applied exercises are provided at the end of each chapter covering supervised learning.

This repository contains my solutions to the labs and exercises as Jupyter Notebooks written in Python using:

  • Numpy
  • Pandas
  • Matplotlib
  • Seaborn
  • Patsy
  • StatsModels
  • Sklearn

Perhaps of most interest will be the recreation of some functions from the R language that I couldn't find in the Python ecosystem. These took me some time to reproduce but the implementation details are not essential to the concepts taught in the book so please feel free to reuse. For example, a reproduction of R's lm() four-way diagnostic plot for linear regression in Chapter 3. Also, a collection of all required datasets is provided in .csv format.

To view notebooks

Links to view each notebook below. The code is provided here.

Chapter 2 - Statistical Learning: Conceptual
Chapter 2 - Statistical Learning: Applied

Chapter 3 - Linear Regression: Conceptual
Chapter 3 - Linear Regression: Applied

Chapter 4 - Classification: Conceptual
Chapter 4 - Classification: Applied

Chapter 5 - Resampling Methods: Conceptual
Chapter 5 - Resampling Methods: Applied

Chapter 6 - Linear Model Selection and Regularization: Labs
Chapter 6 - Linear Model Selection and Regularization: Conceptual
Chapter 6 - Linear Model Selection and Regularization: Applied

Chapter 7 - Moving Beyond Linearity: Labs
Chapter 7 - Moving Beyond Linearity: Applied

Chapter 8 - Tree-Based Methods: Labs
Chapter 8 - Tree-Based Methods: Conceptual
Chapter 8 - Tree-Based Methods: Applied

Chapter 9 - Support Vector Machines: Labs
Chapter 9 - Support Vector Machines: Conceptual
Chapter 9 - Support Vector Machines: Applied

To run notebooks

Running the notebooks enables you to execute the code and play around with any interactive features.

To run:

  1. Install Jupyter Notebooks. I recommend doing this via the Annaconda/Conda method to ensure that package versions play nicely together.
  2. cd to this repo
  3. Run jupyter notebook to run the Jupyter server locally on your machine. It should launch in your browser.
  4. In the Jupyter browser app, navigate to the notebook you'd like to explore.

探索相关项目

加载中…