Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Book · AI & Machine LearningFree

An Introduction to Statistical Learning

The standard first textbook for statistical learning, free as a PDF in two editions: ISLR2 with R labs and ISLP with Python labs. It explains regression, classification, resampling, regularisation, trees, SVMs, deep learning and unsupervised learning with the minimum of maths, and ends every chapter with a hands-on lab.

Editions

ISLR2 (R, 2021), ISLP (Python, 2023)

statlearning.com · Sept 2026

GitHub stars

1.4k (ISLP_labs)

GitHub · Sept 2026

Chapters

12 topic areas, a lab in each

statlearning.com · Sept 2026

Format

Book

Topic

AI & Machine Learning

Provider

James, Witten, Hastie, Tibshirani, Taylor

Time needed

About 11 weeks at 3 to 5 hours a week

Level

Intermediate

Access

Free

What the book is

An Introduction to Statistical Learning, usually called ISL, is written by Gareth James, Daniela Witten, Trevor Hastie and Rob Tibshirani, with Jonathan Taylor joining for the Python edition. It is the gentler companion to The Elements of Statistical Learning and is widely used in university courses on machine learning and applied statistics.

There are two current editions, and the official site offers both as free PDFs:

  • ISLR2 (second edition, with applications in R), 2021.
  • ISLP (with applications in Python), 2023.

The text is essentially the same; the difference is the lab at the end of each chapter, which "demonstrates the chapter's concepts in either R or Python". Printed copies are available from Springer.

What it covers

The book covers statistical learning fundamentals, linear regression, classification, resampling methods (cross-validation and the bootstrap), linear model selection and regularisation (ridge and lasso), moving beyond linearity (splines and generalised additive models), tree-based methods (bagging, random forests and boosting), support vector machines, deep learning, survival analysis, unsupervised learning and multiple testing.

Is it worth it?

For anyone serious about data science, yes. It teaches the ideas that sit under every modelling library: the bias and variance trade-off, why you hold out data, how regularisation controls complexity, and how to compare models honestly. The maths is kept to what you need, and every method is shown on real datasets. After it, library documentation stops being a list of mysterious parameters.

Which edition should I read?

Pick the language you will work in. If you are following a Python route, read ISLP and run its labs; the official labs repository is on GitHub. If you are heading towards research or academic statistics, where R is common, read ISLR2. You can switch later without losing anything, because the explanations are shared.

The free online course

The book site lists free online companion courses on edX for both the R and Python editions, taught by the authors through Stanford. The site says to expect 3 to 5 hours of work a week over 11 weeks, and a paid certificate option is available. The video lectures are the same for both courses, with different coding sessions.

Prerequisites

Comfort with basic algebra and some introductory statistics (means, variance, a regression line) will help. Linear algebra and calculus are not required to follow the main text. For the labs you need beginner level R or Python, including loading data and making a plot.

What you can do after it

You can choose a sensible model for a regression or classification problem, validate it with cross-validation, tune regularisation, explain why a model overfits, and read more advanced texts and papers without getting lost.

Common questions

Is it really free? Yes, the authors host the PDFs on statlearning.com.

Should I do every exercise? Do the labs and a few applied exercises per chapter; they are where the ideas stick.

aimachine learningpython

Ready to start?

Opens on James, Witten, Hastie, Tibshirani, Taylor in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "An Introduction to Statistical Learning". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.