Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"valid deviance" is nan for GBM model, What does this means and how to get rid of this?

I am using Gradient boosting for classification. Though the result is improving but I am getting NaN in validdeviance.

Model = gbm.fit(
  x= x_Train ,
  y = y_Train ,
  distribution = "bernoulli",
  n.trees = GBM_NTREES ,
  shrinkage = GBM_SHRINKAGE ,
  interaction.depth = GBM_DEPTH ,
  n.minobsinnode = GBM_MINOBS ,
  verbose = TRUE
  )

Result

enter image description here

How to tune the parameter to get the validdeviance.

like image 608
Amarjeet Avatar asked May 08 '16 05:05

Amarjeet


1 Answers

I had the same issue, strangely, we're few on this one ...

Adding train.fraction = 0.5 to the option list solves the issue (it seems there is no default value, and validdeviance is not computed without the train.fraction value explicitly mentioned).

like image 146
citraL Avatar answered Sep 22 '22 17:09

citraL