Book Image

Hands-On Ensemble Learning with R

By : Prabhanjan Narayanachar Tattar
Book Image

Hands-On Ensemble Learning with R

By: Prabhanjan Narayanachar Tattar

Overview of this book

Ensemble techniques are used for combining two or more similar or dissimilar machine learning algorithms to create a stronger model. Such a model delivers superior prediction power and can give your datasets a boost in accuracy. Hands-On Ensemble Learning with R begins with the important statistical resampling methods. You will then walk through the central trilogy of ensemble techniques – bagging, random forest, and boosting – then you'll learn how they can be used to provide greater accuracy on large datasets using popular R packages. You will learn how to combine model predictions using different machine learning algorithms to build ensemble models. In addition to this, you will explore how to improve the performance of your ensemble models. By the end of this book, you will have learned how machine learning algorithms can be combined to reduce common problems and build simple efficient ensemble models with the help of real-world examples.
Table of Contents (17 chapters)
Hands-On Ensemble Learning with R
Contributors
Preface
12
What's Next?
Index

Bootstrapping time series models*


An example of the time series data was seen in Chapter 1, Introduction to Ensemble Techniques, in the New Zealand Overseas dataset. See Chapter 10, Ensembling Survival Models, of Tattar et al. (2016). Time series is distinctive in that the observations are not stochastically independent of each other. For example, the maximum temperature of the day is very unlikely to be independent of the previous day's maximum temperature. However, we are likely to believe that the maximum temperature of a block of ten previous days is mostly independent of a ten-day block six months ago. Thus, the bootstrap method is modified to the block bootstrap method. The tsboot function from the boot package is useful to bootstrap time series data. The main structure of the tsboot function appears as follows:

tsboot(tseries, statistic, R, l = NULL, sim = "model",
       endcorr = TRUE, n.sim = NROW(tseries), orig.t = TRUE,
       ran.gen, ran.args = NULL, norm = TRUE, ...,
     ...