cv function

Estimates the penalty coefficient from the cross-validation criterion