Exercises of the book 'Introduction to Statistical Learning with Applications in R'

My solutions to the exercises of ISLR, a foundational textbook that explains the intuition behind famous machine learning algorithms such as Gradient Boosting, Hierarchical Clustering and Elastic Nets, and shows how to implement them in R.

The solutions go from the chapter 3 (Linear Regression) to the chapter 10 (Unsupervised Learning and Clustering) and correspond to the 6th printing of the book, which was the latest available when I started reading it1. Both code and conceptual exercises are included.

Below are direct links to the exercise solutions in each chapter


  1. A new printing has been released since then, including topics that were not covered previously, such as Deep Learning. My solutions haven’t been updated to that edition. ↩︎

Francisco Yirá
Francisco Yirá
Data Scientist and Economist

R, Python, causal inference, machine learning, data visualisation.