# Help on the beta coefficients returned by cvglmnet

I have a question about cross-validation and how the beta values are returned by cvglmnet.

First, I understand that when using 10-fold cross validaiton for optimal parameter search, you take the parameters from the fold that gave the highest performance (in my case AUC). And this might be done preferrably after using nested cross validation in advance to get an overall estimate of model performance/stability.

Second, I understand that when you use cvglmnet, it automatically does cross validation and returns the beta values at each grid point of attempted lambda values. Lambda.min is chosen based on which lambda value gave the higest cvm (the mean cross-validated AUC?). So, in this case, the lambda value that results in the higest average performance across all 10 folds is chosen?

Then what exactly are the beta values for each lambda value in the 'beta' matrix (returned by cvglment). Is it:
(a) the beta coefficients of the one fold that gave the highest perfomrnace at that lambda value, or
(b) the average of the beta coefficients across all 10 folds at that lambda value?

I believe that according to my understanding of how optimal parameter selection in cross-validation works, it should be (a), but so far it seems that cvglmnet seems to be doing (b).