Facing error while implementing Xgboost model on a classification problem

I am seeing this:
bst_model <- xgboost(data=dtrain,eta=1.8, objective=‘multi:softmax’,max.depth=2,nrounds=200,nthread=4,lambda=.19,num_class=4,eval_metric=‘mlogloss’)
Error in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) :
[21:48:20] amalgamation/…/src/objective/multiclass_obj.cc:78: Check failed: label_error >= 0 && label_error < nclass SoftmaxMultiClassObj: label must be in [0, num_class), num_class=4 but found -2147483648 in label.

Any idea what that number is? My label is ranged 0-3

Hi @robot94, could you print the value counts for the classes in target variable and share a screenshot of the same?

© Copyright 2013-2019 Analytics Vidhya