title: Multiclassification with LightGBM
body: <p>I am using latest release of LightGBM to solve a multi classification problem. When I switch the objective to &quot;multiclass&quot;, this error occurs;</p>
  <pre><code>Error in data$update_params(params) : 
    [LightGBM] [Fatal] Number of classes should be specified and greater than 1 for multiclass training
  </code></pre>
  <p>I leave a reproducible example that indicates my way</p>
  <pre><code>catnames &lt;- names(purrr::keep(train_x,is.factor))
  
  dtrain &lt;- lgb.Dataset(as.matrix(train_x), label = train_y,categorical_feature = catnames)
  data_file &lt;- tempfile(fileext = &quot;.data&quot;)
  lgb.Dataset.save(dtrain, data_file)
  dtrain &lt;- lgb.Dataset(data_file)
  lgb.Dataset.construct(dtrain)
  
  model &lt;- lgb.train(data=dtrain,
                     objective = &quot;multiclass&quot;,
                     alpha = 0.1,
                     nrounds = 1000,
                     learning_rate = .1
                     )
  </code></pre>
  <p>Tried to save my target (train_y) as factor, nothing changed.</p>