Skip to contents

A function to train a random forest model to predict environmental effects defined from a MET mixed model analysis with ECs as predictors.

Usage

pred.env.effs(
  train.ECs,
  new.ECs,
  E.effs,
  verbose = TRUE,
  ntree = 1000,
  ncores = NULL
)

Arguments

train.ECs

A data frame of weather and/or soil ECs for observed environments as output from the get.W.ECs() or get.S.ECs() functions.

new.ECs

A data frame of weather and/or soil ECs for new environments as output from the get.W.ECs() or get.S.ECs() functions.

E.effs

A data frame of several or a vector of a single environmental effects parameters fitted from a multi-environmnet trial analysis mixed model. Latent environmental effect factor loadings that decompose GxE can be defined as described by Smith et al (2021)

verbose

Logical. Should progress be printed? Default = TRUE.

ntree

Number of decision trees to use in random forest models. Default = 1000 trees.

ncores

Number (integer) of cores to use for parallel processing. The default (NULL) will use the one less than the maximum available.

Value

A data frame of environmental effect predictions for the new environments with environments as rows and environmental effect variates as columns.

Details

Random forest models are fitted with one 3rd of feature variables samples at each split and a minimum end node size of 5.

References

Smith, A., Norman, A., Kuchel, H., & Cullis, B. (2021). Plant Variety Selection Using Interaction Classes Derived From Factor Analytic Linear Mixed Models: Models With Independent Variety Effects. Frontiers in Plant Science, 12.

Author

Nick Fradgley