O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performing leave-one-out cross-validation to limit overfitting

We provide the framework of the code to perform leave-one-out cross-validation for linear regression. You should be able to easily adapt this code to any other regression technique. The rationale and explanation presented under the previous recipe Performing k-fold cross-validation apply to this one as well.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required