Exploring Machine learning with R and mlr
With chapters selected by Hefin I. Rhys
  • May 2020
  • ISBN 9781617297847
  • 85 pages
Machine learning techniques can accurately and efficiently identify relationships and patterns in data. With the insights and predictive power these discoveries provide, ML is revolutionizing business, finance, the medical field, disaster prediction, and even the arts. With the easy-to-learn programming language R and its powerful ecosystem of tools, any programmer can achieve high-quality data analysis results.

About the book

Exploring Machine learning with R and mlr features three chapters from Machine learning with R, tidyverse, and mlr by author and veteran research scientist Hefin I. Rhys. In the first chapter, you’ll get familiar with common machine learning terminology and different types of machine learning. Next, you’ll gain a solid foundation in the mlr package, R's machine learning answer to Python's scikit-learn. You’ll also drill down into more advanced machine learning theory while learning your first algorithm: k-nearest neighbors. In the final chapter, you’ll explore some of the most commonly used ML techniques including decision trees and ensembling, which can drastically improve the performance of an algorithm. This short but substantial guide is a great way to jumpstart your machine learning education.
Table of Contents detailed table of contents

Introduction

Part 1: Introduction to machine learning

Introduction to machine learning

1.1 What is machine learning?

1.2 Classes of machine learning algorithms

1.3 Thinking about the ethical impact of machine learning

1.4 Why use R for machine learning?

1.5 Which datasets will we use?

1.6 What will you learn in this book?

Summary

Part 2: Classifying based on similarities with k-nearest neighbors

Classifying based on similarities with k-nearest neighbors

3.1 What is the k-nearest neighbors algorithm?

3.1.1 How does the k-nearest neighbors algorithm learn?

3.1.2 What happens if the vote is tied?

3.2 Building your first kNN model

3.2.1 Loading and exploring the diabetes dataset

3.2.2 Using mlr to train your first kNN model

3.2.3 Telling mlr what we’re trying to achieve: Defining the task

3.2.4 Telling mlr which algorithm to use: Defining the learner

3.2.5 Putting it all together: Training the model

3.3 Balancing two sources of model error: The bias-variance trade-off

3.4 Using cross-validation to tell if we’re overfitting or underfitting

3.5 Cross-validating our kNN model

3.5.1 Holdout cross-validation

3.5.2 K-fold cross-validation

3.5.3 Leave-one-out cross-validation

3.6 What algorithms can learn, and what they must be told: Parameters and hyperparameters

3.7 Tuning k to improve the model

3.7.1 Including hyperparameter tuning in cross-validation

3.7.2 Using our model to make predictions

3.8 Strengths and weaknesses of kNN

Summary

Solutions to exercises

Part 3: Classifying with decision trees

Classifying with decision trees

7.1 What is the recursive partitioning algorithm?

7.1.1 Using Gini gain to split the tree

7.1.2 What about continuous and multilevel categorical predictors?

7.1.3 Hyperparameters of the rpart algorithm

7.2 Building your first decision tree model

7.3 Loading and exploring the zoo dataset

7.4 Training the decision tree model

7.4.1 Training the model with the tuned hyperparameters

7.5 Cross-validating our decision tree model

7.6 Strengths and weaknesses of tree-based algorithms

Summary

What's inside

From Machine learning with R, tidyverse, and mlr by Hefin I. Rhys:
  • Chapter 1 - “Introduction”
  • Chapter 3 - “Classifying based on similar observations: the k-Nearest neighbors algorithm”
  • Chapter 7 - “Classifying with trees: Decision trees, random forests and gradient boosting”

About the author

Hefin Ioan Rhys is a senior laboratory research scientist in the Flow Cytometry Shared Technology Platform at The Francis Crick Institute. He spent the final year of his PhD program teaching basic R skills at the university. A data science and machine learning enthusiast, he has his own Youtube channel featuring screencast tutorials in R and R Studio.

placing your order...

Don't refresh or navigate away from the page.
eBook $0.00 PDF only + liveBook
Exploring Machine learning with R and mlr (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks