1
$\begingroup$

Dealing with categorical features while training LightGBM model implies encoding them as integers and providing categorical_feature parameter with their indices or names.

LightGBM documentation says that:

Tree decision rule works best when categorical features are presented by consecutive integers starting from zero

and

all negative values will be treated as missing values

My question is: when zero_as_missing parameter is set, does it refer only to continuous features, and categorical will still be considered missing if their value is negative?

zero_as_missing 🔗︎, default = false, type = bool

set this to true to treat all zero as missing values (including the unshown values in LibSVM / sparse matrices)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.