treelite icon indicating copy to clipboard operation
treelite copied to clipboard

Mimic the behavior of LightGBM for sparse array inputs

Open hcho3 opened this issue 3 years ago • 0 comments

When given a sparse array (scipy.sparse.csr_matrix), LightGBM assigns value 0 to all features that are not present in the sparse array. Currently, Treelite converts non-present features into NaNs. We will need to add a flag to indicate that non-present features should be converted into zeros instead.

Related: https://github.com/microsoft/LightGBM/pull/4468#issuecomment-883859996

hcho3 avatar Jul 21 '21 04:07 hcho3