0

We have two questions about how train(tuneLength=) in the R package caret determines the number of lambda values to try when using glmnet. The tuneLength option seems to set only the number of alpha values to try. The number of lambda values in the search grid seems to vary across models when tuneLength is set to one value.

  1. Is caret relying on glmnet to both select the values of lambda and the number of values of lambda, or is it using another method to determine the number of values of lambda to include in the search grid?
  2. We know that in glmnet it is possible to control the number of lambda values included in the search grid. Is it possible to control the number of lambda values included in the search grid in caret?

We've searched in the caret documentation and used modelLookup("glmnet"), and we found a similar question posed here regarding tuneLength and SVM (R understanding {caret} train(tuneLength = ) and SVM methods from {kernlab}).

H.M.
  • 1
  • 1

0 Answers0