Multiclass logistic loss scores predictions across several classes by extending binary logistic loss to multiclass classification. Its softmax form is commonly used for multinomial logistic regression, neural networks, and tree-based classifiers. section 5.5.2 section 6.5.2
Use the loss as part of a practical training and evaluation workflow:
- Train multiclass LightGBM models with multiclass logistic loss and monitor multi_logloss on a held-out test set. section 5.5.2
- Select learning and complexity hyperparameters through five-fold RandomizedSearchCV rather than testing every combination. section 5.5.2 section 6.5.2
- Keep multiclass error for evaluation rather than optimization when using XGBoost, because merror is not differentiable and cannot provide gradients or Hessians. section 6.5.2
LightGBM evaluation setup
A LightGBM classifier can monitor multiclass logistic loss with eval_metric='multi_logloss', evaluate on (Xtst, ytst), and stop early after 25 rounds without improvement. section 5.5.2
fixed_params = {'early_stopping_rounds': 25,
'eval_metric' : 'multi_logloss',
'eval_set' : [(Xtst, ytst)],
'eval_names': ['test set'],
'verbose': 100}
Inspect the compact LightGBM configuration for multi_logloss, held-out evaluation, and early stopping. section 5.5.2
