Solved – Cross-validation and weights with glmnet

Are any weights supplied to glmnet::cv.glmnet taken into account for the calculation of the figure of merit (AUC for logistic regression in my case) on the "held-out" dataset, or only used directly in the fitting?

I was looking for the answer to the same question and I took a look into the code (v1.8-2) in .

The file "cv.elnet.R" (in your case cv.lognet.r) contains the relevant pieces of code.








So the package does use the weights in the computation of the figures of merit even on the held-out data. (You will find similar lines in cv.lognet.r as well.)

Similar Posts:

Rate this post

Leave a Comment