# \donttest{
# Toy example using lm
data <- data.frame(
time = 1:50,
y = seq(1, 10, length.out = 50) + stats::rnorm(50, sd = 0.1)
)
# Simple linear model as a proxy for a discovered equation
model <- stats::lm(y ~ time, data = data)
# Run cross-validation
cv_res <- cross_validate(
equation = model,
data = data,
response = "y",
k = 3,
method = "random"
)
print(cv_res)
# }
Run the code above in your browser using DataLab