Can anyone clarify how is the best procedure to set.seed() before running a machine learning algorithms? I have built a random forest model, a gbm model and a bart model. Does every of them require a seed for reproducible results? I have not split my dataset into train and test. I have seen a lot of examples for random forest but I am not sure if this is required for BART and GBM as well. An example of my models:
set.seed(500)
mod_BART <- bart(x.train = dataset[ , preds_selected], y.train = dataset[ , 1], keeptrees = TRUE)
summary(mod_BART)
set.seed(500)
formula_GBM <- as.formula(paste("presence ~", paste(preds_selected, collapse = "+")))
mod_GBM <- gbm(formula_GBM, data = dataset, distribution="bernoulli")
Also how many times should I set the seed? if the models are in the same script is it enough to set only 1 seed before the first model? Thanks a lot Angela