# \donttest{
# Attach packages
library(cvms)
library(groupdata2) # partition()
library(dplyr) # %>% arrange()
# Data is part of cvms
data <- participant.scores
# Set seed for reproducibility
set.seed(1)
# Partition data
partitions <- partition(data, p = 0.7, list_out = TRUE)
train_set <- partitions[[1]]
test_set <- partitions[[2]]
# Create baseline evaluations
# Note: usually n=100 is a good setting
baseline_gaussian(
test_data = test_set,
train_data = train_set,
dependent_col = "score",
random_effects = "(1|session)",
n = 2
)
# Parallelize evaluations
# Attach doParallel and register four cores
# Uncomment:
# library(doParallel)
# registerDoParallel(4)
# Make sure to uncomment the parallel argument
baseline_gaussian(
test_data = test_set,
train_data = train_set,
dependent_col = "score",
random_effects = "(1|session)",
n = 4
#, parallel = TRUE # Uncomment
)
# }
Run the code above in your browser using DataLab