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 has 14 customers in the training data, and 2 customers in the testing data. Although we have a bigger training set, the classifier threw an error:
XGBoostError: value 0 for Parameter num_class should be greater equal to 1
Previous posts on the forum have mentioned that the .fit() method automatically sets the num_class parameter. See here: XGBClassifier num_class is invalid. Therefore, the problem seems to be caused by something else.
Does anybody has any idea where the problem is? Any help is appreciated!