View source: R/gs_fast_bayesian.R
gs_fast_bayesian | R Documentation |
This function performs a cross validation using the Fast Bayesian method which requires to fit only one model per trait.
gs_fast_bayesian(
Pheno,
Geno,
traits,
folds,
predictors = c("Env", "Line", "EnvxLine"),
is_multitrait = FALSE,
iterations_number = 1500,
burn_in = 500,
thinning = 5,
seed = NULL,
verbose = TRUE
)
Pheno |
( |
Geno |
( |
traits |
( |
folds |
( |
predictors |
( |
is_multitrait |
( |
iterations_number |
( |
burn_in |
( |
thinning |
( |
seed |
( |
verbose |
( |
validate_params |
( |
A GSFastBayesian
object with the following attributes:
Pheno: (data.frame
) The phenotypic data.
Geno: (matrix
) The genotypic data.
traits: (character
) The traits' names.
is_multitrait: (logical(1)
) Is multitrait analysis?
Predictions: (data.frame
) The predictions of cross validation. This
data.frame
contains the Trait
, Fold
, Line
, Env
, Predicted
and Observed
columns.
execution_time: (difftime
) The execution time taken for the analysis.
folds: (list
) The folds used in the analysis.
model: (BayesianModel
) The model fitted.
model_name: (character(1)
) The name of the model.
iterations_number: (numeric(1)
) Number of iterations to fit the model.
burn_in: (numeric(1)
) Number of items to burn at the beginning of the
model.
thinning: (numeric(1)
) Number of items to thin the model.
Other gs_models:
gs_bayesian()
data(Maize)
folds <- cv_kfold(nrow(Maize$Pheno), k = 5)
results <- gs_fast_bayesian(
Maize$Pheno,
Maize$Geno,
traits = "Y",
folds = folds,
is_multitrait = FALSE,
iterations_number = 10,
burn_in = 5,
thinning = 5,
seed = NULL,
verbose = TRUE
)
print(results)
#> $Predictions
#> # A tibble: 2,888 × 6
#> Trait Fold Line Env Observed Predicted
#> <fct> <fct> <fct> <fct> <dbl> <dbl>
#> 1 Y 1 L001_L003 1 -0.0274 7.11
#> 2 Y 1 L001_L012 1 0.574 3.89
#> 3 Y 1 L001_L023 1 -0.0636 3.95
#> 4 Y 1 L001_L033 1 0.215 2.05
#> 5 Y 1 L001_L034 1 0.299 2.70
#> # … with 2,883 more rows
#> # ℹ Use `print(n = ...)` to see more rows
#>
#> $traits: Y
#>
#> $is_multitrait: FALSE
#>
#> $folds: 5
#>
#> $execution_time: 0.841673 mins
#>
#> $Pheno
#> envs_num: 4
#> lines_num: 722
#> rows_num: 2888
#>
#> $Geno
#> rows_num: 722
#> cols_num: 722
#>
#> $model_name: BGBLUP
#>
#> $iterations_number: 10
#>
#> $burn_in: 5
#>
#> $thinning: 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.