Machine Learning with R, the tidyverse, and mlr by Hefin I. Rhys

Machine Learning with R, the tidyverse, and mlr by Hefin I. Rhys

Author:Hefin I. Rhys
Language: eng
Format: mobi, epub
Publisher: Manning Publications
Published: 2020-03-31T05:39:52.029000+00:00


Note

Recall that I mentioned how important it is to scale our predictors so that they are weighted equally when calculating the L1 and/or L2 norms. Well, glmnet does this for us by default, using its standardize = TRUE argument. This is handy, but it’s important to remember that the parameter estimates are transformed back onto the variables’ original scale.

Listing 11.8. Extracting the model parameters

ridgeModelData <- getLearnerModel(tunedRidgeModel)

ridgeCoefs <- coef(ridgeModelData, s = tunedRidgePars$x$s)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.