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

View source: R/predict_cv0.R

predict_cv0R Documentation

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

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 CV0. Creation of the list of train/test splits based on phenotypic data, so that all the phenotypes from the same environment/year/site appear in the same fold, according to the type of the CV0 scheme.

Usage

predict_cv0(pheno_data, cv0_type)

Arguments

pheno_data

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

cv0_type

character either leave-one-environment-out, leave-one-site-out, leave-one-year-out or forward-prediction.

Value

a cv_object object which contains the train/test splits of the CV scheme. 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.