Books for Machine Learning with R

R is a powerful platform for data analysis and machine learning. It is my main workhorse for things like competitions and consulting work. The reason is the large amounts of powerful algorithms available, all on the one platform.

In this post I want to point out some resources you can use to get started in R for machine learning.

Introduction to R

You might want to familiarize yourself with the platform and language before you start addressing your problems with machine learning.

I think the best way to familiarize yourself is to start addressing problems. The trial of real work will force you to learn what you must learn to solve your problem.A good reference can help you answer your “how do I…” questions.

R in a Nutshell

Amazon Image

The book I read cover-to-cover when first starting out with R was R in a Nutshell. It walks you through the platform from installation, basic operations, data analysis and even some machine learning algorithms. I highly recommend it.

I chose it because it was a broad reference. I wanted to know a little bit of everything in the platform, so I would know where to look when I had a specific question.

Machine Learning

There is a wealth of machine learning algorithms implemented in R, many by the academics and their teams that actually developed them in the first place. This alone is a complelling reason to get started in R. Additionally, the data handling/manipulation and graphing tools are very powerful (although Python’s SciPy stack is catching up).

CRAN: Machine Learning and Statistical Learning

Not a book, but a great place you can start out is the Machine Learning and Statistical Learning view on CRAN maintained by Torsten Hothorn. It lists most of the R packages you can use for machine learning, grouped by algorithm and algorithm types.

It is a great place to start, but one thing that I think it could do better is point out canonical packages and to elaborate more on some of the wrapper packages available like caret.

Applied Predictive Modeling

Amazon Image

Max Kuhn, an author to this book is the creator of the famous caret package. Applied Predictive Modeling is very practical and opens in the first part with a description of predictive analytics process and case studies. Parts 2 and 3 look at regression and classification algorithms and the final Part covers more advanced topics like feature selection.

It’s a thick book and an excellent reference, and I’m a a fan of this book. Also check out the companion website for relevant resources.

An Introduction to Statistical Learning: with Applications in R

Amazon Image

This is the more accessible version of the classic “The Elements of Statistical Learning: Data Mining, Inference, and Prediction” and includes two of the same authors.

An Introduction to Statistical Learning opens with an introduction to Statistical Learning and concerns such as model accuracy and the bias-variance tradeoff. Chapters 3 and 4 looks at linear regression and some simpler classification algorithms. Following chapters look at cross validation, model selection before moving into non-linear regression, decision trees, SVM and finishing up with unsupervised methods.

The book is also available online for free from the authors webpage.

Practical Data Science with R

Amazon Image

Practical Data Science with R has more of a data science spin than machine learning. Part 1 is introductory looking at loading data into R. Part 2 starts off with model evaluation and works through models in increasing complexity through k-NN, Naive Bayes, Linear Regression, clustering, association rules and SVM. Part 3 works through advanced issues like self-documenting scripts and presenting results.

Provides a good introduction with solid practical advice.

Machine Learning with R

Amazon Image

Machine Learning with R provides an overview of machine learning in R without going into detail or theory. It also heavily uses case studies to demonstrate each algorithm. It opens with a brief introduction to machine learning and R and in data management in R. It goes on in subsequent chapters to cover k-NN, Naive Bayes, Decision Trees, Regression, Neural Networks, Apriori, and Clustering.

It finishes up with chapters on model evaluation, algorithm tuning and other advanced topics. A good feature of this text are the step-by-step sequences provided in each chapter, providing an actionable framework around the case studies.

Data Mining with R: Learning with Case Studies

Amazon Image

After a quick introduction to R in the first chapter, Data Mining with R presents case study after case study. These include: predicting algae blooms, stock market returns, fraudulent transactions and classifying microarray samples. Each study explores various different data preparation, model building and model evaluation methods.

It’s a dense by valuable book if you’re looking for getting a feel for working through real problems.

Data Mining and Business Analytics with R

Amazon Image

Data Mining and Business Analytics with R provides worked examples using R, but the examples are more business focused than scientifically focused, as in some other books. The chapters work through the key machine learning methods using R with smaller case studies throughout. The book finishes with some larger case studies on sentiment analysis in text and modeling network data.

Data Mining with Rattle and R: The Art of Excavating Data for Knowledge Discovery (Use R!)

Amazon Image

Data Mining with Rattle and R provides an introduction to machine learning algorithms, although the twist is that uses the Rattle graphical environment. After the introductory material on loading and handling data in part 1, the standard machine learning algorithms are covered in part 2.

What I do like about the presentation of the algorithms is the standardized description that includes a tutorial, parameter tuning and command summary. I’m big fan of the consistent structured presentation of algorithms.


We have coved 7 popular machine learning books that focus on using the R platform.

The best advice I can give is to pick one and read it. Read it cover to cover, take notes and do the exercises. Like programming, using R is a practical skill that you can only build by practicing. Practice machine learning R.

Have I missed a Machine Learning book on R? Leave a comment and let me know.

8 Responses to Books for Machine Learning with R

  1. yin June 30, 2014 at 9:19 pm #

    The book Machine Learning for Hackers is good. Also based on R.

    • jasonb July 2, 2014 at 10:39 am #

      Of course, I can’t believe I left this book off my list. Thanks yin!

  2. Santiago Cepas July 2, 2014 at 2:11 am #

    Another great post Jason, keep it up!

    Another good book I’ve been reading recently is “Doing Data Science: Straight Talk from the Frontline”.

    Accessible and practical and with lots of examples in R.

    • jasonb July 2, 2014 at 10:40 am #

      Thanks for the tip Santiago. I’m ordering a copy now.

  3. Max Barrass July 14, 2014 at 9:17 am #

    Nice summary Jason, great work as usual. Thanks.

  4. sumendar November 7, 2014 at 4:55 am #

    Nice post, These Books are really helpful for R programmers

    • jasonb November 7, 2014 at 5:07 am #

      Thanks sumendar

  5. Rafi November 24, 2014 at 4:24 am #

    Nice post.

    I was wondering if you know of any books that helps guide you through building machine learning algorithms in R in the same way Andrew NG does with Matlab in his famous Machine Learning course?

    I know there are many algorithms built in to packages, but given that R handles linear algebra pretty well, it would be nice if there was book that helps develop intuition behind building algorithms with its syntax.

    I’m going through the ISLR book at the moment, and have to say that is an amazing book if you want to get started in Statistical/Machine Learning. It goes very well with these archived lecture videos from the eDX website;

    There are even R sessions in there where the lecturers guide you through examples. I believe the course is due to begin again in mid-January 2015. I highly recommend it!

Leave a Reply