Why is the validation error coming to be NaN in boosting in R

r
boosting
gradient_boosting

#1

hello,

while trying to implement boosting in R:

boost.train.class=gbm(wage~., data=training, n.trees=500,interaction.depth=4)
head(boost.train.class$valid.error) 

I do not understand how the validation error is coming out to be NaN.The