Description Usage Arguments Value Examples
View source: R/RandomPartition.R
This method consists of randomly dividing the training data set and the test data set. For each division, the approximation function is adjusted from the training data and calculates the output values for the test data set. The result corresponds to the arithmetic mean of the values obtained for the different divisions.
1 2 3 4 5 6 7 | CV.RandomPart(
DataSet,
NPartitions = 10,
PTesting = 0.35,
Traits.testing = NULL,
set_seed = NULL
)
|
DataSet |
|
NPartitions |
|
PTesting |
|
Traits.testing |
|
set_seed |
|
List
A list object with length of NPartitions
, every index has a the positions to use like testing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(BMTME)
data("WheatIranianToy")
phenoIranianToy <- phenoIranianToy[order(phenoIranianToy$Env, phenoIranianToy$GID), ]
pheno <- data.frame(GID = phenoIranianToy[, 1], Env = phenoIranianToy$Env,
Trait = rep(colnames(phenoIranianToy)[3:4], each = dim(phenoIranianToy)[1]),
Response = c(phenoIranianToy[, 3], phenoIranianToy[, 4]))
CV.RandomPart(pheno)
CV.RandomPart(pheno, NPartitions = 10)
CV.RandomPart(pheno, Traits.testing = 'DTM')
CV.RandomPart(pheno, NPartitions = 10, PTesting = .35)
CV.RandomPart(pheno, NPartitions = 10, Traits.testing = 'DTH')
CV.RandomPart(pheno, NPartitions = 10, PTesting = .35, set_seed = 5)
CV.RandomPart(pheno, NPartitions = 10, PTesting = .35, Traits.testing = 'DTH')
CV.RandomPart(pheno, NPartitions = 10, PTesting = .35, Traits.testing = 'DTM', set_seed = 5 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.