treelite
treelite copied to clipboard
Mimic the behavior of LightGBM for sparse array inputs
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