Reader small image

You're reading from  R Bioinformatics Cookbook - Second Edition

Product typeBook
Published inOct 2023
PublisherPackt
ISBN-139781837634279
Edition2nd Edition
Right arrow
Author (1)
Dan MacLean
Dan MacLean
author image
Dan MacLean

Professor Dan MacLean has a PhD in molecular biology from the University of Cambridge and gained postdoctoral experience in genomics and bioinformatics at Stanford University in California. Dan is now an honorary professor at the School of Computing Sciences at the University of East Anglia. He has worked in bioinformatics and plant pathogenomics, specializing in R and Bioconductor, and has developed analytical workflows in bioinformatics, genomics, genetics, image analysis, and proteomics at the Sainsbury Laboratory since 2006. Dan has developed and published software packages in R, Ruby, and Python, with over 100,000 downloads combined.
Read more about Dan MacLean

Right arrow

Testing the fit of the model using cross-validation

Cross-validation provides a reliable estimate of a model’s performance on unseen data. Simulating the model’s performance on multiple subsets of the data reduces the effect of random variations in the training and testing data splits, providing a more realistic assessment of its generalizability.

K-fold cross-validation involves dividing a dataset into K equally-sized subsets, or folds, where K is a predefined number typically chosen between 5 and 10. The original dataset is randomly partitioned into K subsets of approximately equal size (folds), and a model is trained on K-1 folds and evaluated on the fold left out. This means that K-separate model training and evaluation cycles are performed. The performance values from the K iterations are then averaged to obtain a single metric that represents the overall performance.

Leave-one-out (LOO) cross-validation is a variant of cross-validation where the number of...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
R Bioinformatics Cookbook - Second Edition
Published in: Oct 2023Publisher: PacktISBN-13: 9781837634279

Author (1)

author image
Dan MacLean

Professor Dan MacLean has a PhD in molecular biology from the University of Cambridge and gained postdoctoral experience in genomics and bioinformatics at Stanford University in California. Dan is now an honorary professor at the School of Computing Sciences at the University of East Anglia. He has worked in bioinformatics and plant pathogenomics, specializing in R and Bioconductor, and has developed analytical workflows in bioinformatics, genomics, genetics, image analysis, and proteomics at the Sainsbury Laboratory since 2006. Dan has developed and published software packages in R, Ruby, and Python, with over 100,000 downloads combined.
Read more about Dan MacLean