predict_cv1: Get train/test splits of the phenotypic MET dataset based on...

View source: R/predict_cv1.R

predict_cv1R Documentation

Get train/test splits of the phenotypic MET dataset based on CV1.

Description

Get train/test splits of the phenotypic MET dataset based on a number of random k-folds partitions determined by the user, according to the type CV1. Creation of the list of train/test splits based on phenotypic data, so that all the phenotypes from the same line appear in same fold (prediction of new lines never observed in any environment).

Usage

predict_cv1(pheno_data, nb_folds, reps, seed)

Arguments

pheno_data

data.frame Dataset containing phenotypic outcome data, as well as the predictor variables

nb_folds

numeric Number of folds in the CV process. In CV1 lines are randomly assigned to folds: this ensures that all the records of a given line are assigned to the same fold.

reps

numeric Number of repeats of the k-folds CV

Value

a cv_object object which contains nb_folds x reps elements. Each element of the object corresponds to a split object with two elements:

training

data.frame Dataset with all observations for the training set.

test

data.frame Dataset with all observations for the test set.

Author(s)

Cathy C. Westhues cathy.jubin@hotmail.com

References

\insertRef

jarquin2017increasinglearnMET \insertRefjarquin2014reactionlearnMET


cjubin/learnMET documentation built on Nov. 4, 2024, 6:23 p.m.