Caret with glmnet method / Standardization of variables

Dear Community,

I'm currently using caret package to fine-tune alpha / lambda values for elastic net regression. I use inside the glmnet method inside the caret train function.

So far, I've assumed that variables in the training set (XTrainMatrix) are automatically standardized inside the caret train function. Indeed, as per documentation, the glmnet function does the standardization by default

Is my assumption correct ?

enet <- train(XTrainMatrix,Train.response, method="glmnet", metric = "RMSE", trControl = ctrl.caret, tuneGrid = grid.caret)

Thank you for your advices.

caret does not automatically standardize then but the preProcess option can be used to do so. Also, glmnet can standardized too.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.