Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Mastering Machine Learning with R
Mastering Machine Learning with R

Mastering Machine Learning with R: Advanced machine learning techniques for building smart applications with R 3.5 , Third Edition

eBook
$20.98 $29.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Mastering Machine Learning with R

Linear Regression

"An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem."
– John Tukey

It's essential that we get started with a simple yet extremely effective technique that's been used for a long time: linear regression. Albert Einstein is believed to have remarked at one time or another that things should be made as simple as possible, but no simpler. This is sage advice and a good rule of thumb in the development of algorithms for machine learning. Considering the other techniques that we'll discuss later, there's no simpler model than tried and tested linear regression, which uses the least squares approach to predict a quantitative outcome. We can consider it to be the foundation of all the methods that we'll discuss later, many of which are mere extensions. If you can...

Univariate linear regression

We begin by looking at a simple way to predict a quantitative response, Y, with one predictor variable, x, assuming that Y has a linear relationship with x. The model for this can be written as follows:

We can state it as the expected value of Y is a function of the parameters (the intercept) plus (the slope) times x, plus an error term e. The least squares approach chooses the model parameters that minimize the Residual Sum of Squares (RSS) of the predicted y values versus the actual Y values. For a simple example, let's say we have the actual values of Y1 and Y2 equal to 10 and 20 respectively, along with the predictions of y1 and y2 as 12 and 18. To calculate RSS, we add the squared differences:

This, with simple substitution, yields the following:

Before we begin with an application, I want to point out that if you read the headlines...

Multivariate linear regression

In the case study that follows, we're going to look at the application of some exciting methods on an interesting dataset. Like in the previous chapter, once the data is loaded we'll treat it, but unlike the previous example, we'll split it into training and testing sets. Given the dimensionality of the data, feature reduction and selection are critical.

We'll explore the oft-maligned stepwise selection, then move on to one of my favorite methodologies, which is Multivariate Adaptive Regression Splines (MARS). If you're not using MARS, I highly recommend it. I've been told, but cannot verify it, that Max Kuhn stated in a conference that it's his starting procedure. I'm not surprised if it's true. I learned the technique from a former Senior Director of Analytics at one of the largest banks in the world...

Summary

In the context of machine learning, we train a model and test it to predict an outcome. In this chapter, we had an in-depth look at the simple yet extremely effective methods of linear regression and MARS to predict a quantitative response. We also applied the data preparation paradigm put forth in Chapter 1, Preparing and Understanding Data, to quickly and efficiently get the data ready for modeling. We produced several simple plots to understand the response we were trying to predict, explore model assumptions, and model results.

Later chapters will cover more advanced techniques like Logistic regression, Support Vector Machines, Classification, Neural Networks, and Deep Learning but many of them are mere extensions of what we've learned in this chapter.

Left arrow icon Right arrow icon

Key benefits

  • Build independent machine learning (ML) systems leveraging the best features of R 3.5
  • Understand and apply different machine learning techniques using real-world examples
  • Use methods such as multi-class classification, regression, and clustering

Description

Given the growing popularity of the R-zerocost statistical programming environment, there has never been a better time to start applying ML to your data. This book will teach you advanced techniques in ML ,using? the latest code in R 3.5. You will delve into various complex features of supervised learning, unsupervised learning, and reinforcement learning algorithms to design efficient and powerful ML models. This newly updated edition is packed with fresh examples covering a range of tasks from different domains. Mastering Machine Learning with R starts by showing you how to quickly manipulate data and prepare it for analysis. You will explore simple and complex models and understand how to compare them. You’ll also learn to use the latest library support, such as TensorFlow and Keras-R, for performing advanced computations. Additionally, you’ll explore complex topics, such as natural language processing (NLP), time series analysis, and clustering, which will further refine your skills in developing applications. Each chapter will help you implement advanced ML algorithms using real-world examples. You’ll even be introduced to reinforcement learning, along with its various use cases and models. In the concluding chapters, you’ll get a glimpse into how some of these blackbox models can be diagnosed and understood. By the end of this book, you’ll be equipped with the skills to deploy ML techniques in your own projects or at work.

Who is this book for?

This book is for data science professionals, machine learning engineers, or anyone who is looking for the ideal guide to help them implement advanced machine learning algorithms. The book will help you take your skills to the next level and advance further in this field. Working knowledge of machine learning with R is mandatory.

What you will learn

  • Prepare data for machine learning methods with ease
  • Understand how to write production-ready code and package it for use
  • Produce simple and effective data visualizations for improved insights
  • Master advanced methods, such as Boosted Trees and deep neural networks
  • Use natural language processing to extract insights in relation to text
  • Implement tree-based classifiers, including Random Forest and Boosted Tree

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 31, 2019
Length: 354 pages
Edition : 3rd
Language : English
ISBN-13 : 9781789613568
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Jan 31, 2019
Length: 354 pages
Edition : 3rd
Language : English
ISBN-13 : 9781789613568
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 130.97
Mastering Machine Learning with R
$43.99
Machine Learning with R
$59.99
R Statistics Cookbook
$26.99
Total $ 130.97 Stars icon

Table of Contents

15 Chapters
Preparing and Understanding Data Chevron down icon Chevron up icon
Linear Regression Chevron down icon Chevron up icon
Logistic Regression Chevron down icon Chevron up icon
Advanced Feature Selection in Linear Models Chevron down icon Chevron up icon
K-Nearest Neighbors and Support Vector Machines Chevron down icon Chevron up icon
Tree-Based Classification Chevron down icon Chevron up icon
Neural Networks and Deep Learning Chevron down icon Chevron up icon
Creating Ensembles and Multiclass Methods Chevron down icon Chevron up icon
Cluster Analysis Chevron down icon Chevron up icon
Principal Component Analysis Chevron down icon Chevron up icon
Association Analysis Chevron down icon Chevron up icon
Time Series and Causality Chevron down icon Chevron up icon
Text Mining Chevron down icon Chevron up icon
Creating a Package Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Half star icon Empty star icon Empty star icon Empty star icon 1.3
(3 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 33.3%
1 star 66.7%
floren25 Nov 24, 2020
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Este libro está escrito con la nueva forma de programar en R basada en tidyverse. Tengo cierta familiaridad con esta forma de escribir código desde que leí «R for Data Science», de Hadley Wickham y Garrett Grolemund, en que se expone en detalle todo el asunto.El problema con la lectura de este texto es que el código suministrado por el autor en la página web que sirve de soporte a este libro está plagado de errores. Y, lo que es más enigmático para mí, allí donde el código funciona, da como resultado al ejecutarlo en R algo distinto de lo que aparece en el texto escrito. Otro detalle adicional es que, a pesar de que la tercera edición de este libro es de 2019, Lesmeister emplea paquetes de R que han caído en desuso y están obsoletos. Todo esto ha hecho que la lectura haya sido bastante frustrante. Una pena porque me las prometía felices con este libro.
Amazon Verified review Amazon
naima Jul 13, 2021
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This book has the worst codes I have ever seen.
Amazon Verified review Amazon
Dr. Marilou Haines May 31, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This is a very unfriendly website. First you need to register to get access to the data. Then, you need to look forever to find the support tab. And once you find it, you get stuck because there is no way to finalize the step. I have a book, but no files to work with. I may just have to send the book back.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.