XGBoost Algorithm with R - Train model accuracy validation

This is a good sample how we can use to validate a train model to find the best setup:

 

Watch this video: https://www.youtube.com/watch?v=woVTNwRrFHE