March 2019
Beginner to intermediate
448 pages
13h 14m
English
The handy train() function in caret will allow us to find the best hyperparameters for these models. In this recipe, we will use the longley dataset, which is included in R's standard datasets library. This dataset contains the number of people employed (which is our target variable), and several features (such as the number of unemployed, the year, the GNP, the GNP deflator, and the population). There are two challenges here; it only contains annual data from 1947 to 1962, and some of the variables are highly colinear:
Read now
Unlock full access