Skip to Main Content
Hands-On Ensemble Learning with R
book

Hands-On Ensemble Learning with R

by Prabhanjan Narayanachar Tattar
July 2018
Beginner to intermediate content levelBeginner to intermediate
376 pages
9h 1m
English
Packt Publishing
Content preview from Hands-On Ensemble Learning with R

The gbm package

The R gbm package, created by Greg Ridgeway, is a very versatile package. The details of this package can be found at http://www.saedsayad.com/docs/gbm2.pdf. The document details the theoretical aspects of the gradient boosting and illustrates various other parameters of the gbm function. First, we will consider the shrinkage factor available in the gbm function.

Shrinkage parameters are very important, and also help with the problem of overfitting. Penalization is achieved through this option. For the spam dataset, we will set the shrinkage option to 0.1 (very large) and 0.0001 (very small) and also look at how the performance is affected:

> spam_Train2 <- spam_Train > spam_Train2$type <- as.numeric(spam_Train2$type)-1 > spam_gbm ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Deep Learning with R

Hands-On Deep Learning with R

Rodger Devine, Michael Pawlus
Learning Bayesian Models with R

Learning Bayesian Models with R

Hari Manassery Koduvely
Advanced Machine Learning with R

Advanced Machine Learning with R

Cory Lesmeister, Dr. Sunil Kumar Chinnamgari

Publisher Resources

ISBN: 9781788624145Supplemental Content