I use the xgboost fucntion to optimaize my model, which predicts the price of used cars
index <- sample((1:nrow(x)), round(0.8*nrow(x))) training <- x[i