xgbclassifier

XGBoostError: value 0 for Parameter num_class should be greater equal to 1

◇◆丶佛笑我妖孽 提交于 2021-01-28 11:53:26
问题 I'm trying to compare two different feature sets for classifying customers into high-value, mid-value, and low-value. This is the code I used: ltv_xgb_model = xgb.XGBClassifier(max_depth=5, learning_rate=0.1,objective='multi:softmax',n_jobs=-1).fit(X_train, y_train) The first dataset has 11 customers in the training data, and 2 customers in the testing data. The classifier is able to achieve 50% precision for one of the feature sets, despite the limited number of customers. The second dataset