if (torch::torch_is_installed()) {
torch::torch_manual_seed(123)
# Simulate data with default settings
sim_data <- simGPR()
# Simulate data with custom settings
sim_data <- simGPR(N = 100, d = 5, d_mean = 2, perc_spars = 0.3, sigma2 = 0.5)
# Access the simulated data
head(sim_data$data)
# Access the true values used for simulation
sim_data$true_vals
}
Run the code above in your browser using DataLab