title: XGBoostError: value 0 for Parameter num_class should be greater equal to 1
body: <p>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:</p>
  
  <pre><code>ltv_xgb_model = xgb.XGBClassifier(max_depth=5, learning_rate=0.1,objective='multi:softmax',n_jobs=-1).fit(X_train, y_train)        
  </code></pre>
  
  <p>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. </p>
  
  <p>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:</p>
  
  <blockquote>
    <p>XGBoostError: value 0 for Parameter num_class should be greater equal to 1</p>
  </blockquote>
  
  <p>Previous posts on the forum have mentioned that the .fit() method automatically sets the <em>num_class</em> parameter. See here: <a href="https://stackoverflow.com/questions/35384977/xgbclassifier-num-class-is-invalid">XGBClassifier num_class is invalid</a>. Therefore, the problem seems to be caused by something else.</p>
  
  <p>Does anybody has any idea where the problem is? Any help is appreciated!</p>