The lgbm_classification_learner supported only a multiclass objective for a multi-class classification problem.
When a softmax (alias for multiclass) or a multiclassova (and all its aliases) were used as an objective, lgbm_classification_learner failed to produce a prediction function, resulting in an error.
Description of the changes proposed in the pull request
Added a set LGBM_MULTICLASS_OBJECTIVES that contains all multi-class objectives that can be used in LGBM as of today.
Created a boolean variable is_multiclass_classification that determines whether a multi-class problem is being solved or not.
Replaced two instances of params["objective"] == "multiclass" with a single is_multiclass_classification boolean variable. This modification directs the flow inside the prediction function p to support new multi-class objectives, instead of just multiclass.
Where should the reviewer start?
Changes were only made inside lgbm_classification_learner.
Status
READY
Todo list
Background context
The
lgbm_classification_learner
supported only amulticlass
objective for a multi-class classification problem.When a
softmax
(alias formulticlass
) or amulticlassova
(and all its aliases) were used as an objective,lgbm_classification_learner
failed to produce a prediction function, resulting in an error.Description of the changes proposed in the pull request
LGBM_MULTICLASS_OBJECTIVES
that contains all multi-class objectives that can be used in LGBM as of today.is_multiclass_classification
that determines whether a multi-class problem is being solved or not.params["objective"] == "multiclass"
with a singleis_multiclass_classification
boolean variable. This modification directs the flow inside the prediction functionp
to support new multi-class objectives, instead of justmulticlass
.Where should the reviewer start?
Changes were only made inside
lgbm_classification_learner
.