# NOT RUN {
# dataset generation
base = mixture_generator(n = 15, p = 5, valid = 100, scale = TRUE)
X_appr = base$X_appr # learning sample
Y_appr = base$Y_appr # response variable
X_test = base$X_test # validation sample
Y_test = base$Y_test # response variable (validation sample)
A = lm(Y_appr ~ X_appr)$coefficients
MSE_loc(Y = Y_appr, X = X_appr, A = A) # MSE on the learning dataset
MSE_loc(Y = Y_test, X = X_test, A = A) # MSE on the validation sample
# }
Run the code above in your browser using DataLab