scikit-learn-contrib / imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
https://imbalanced-learn.org
MIT License
6.85k stars 1.29k forks source link

ENH preserve dtype and type when providing a dataframe with sparse dtype #1054

Closed ts2095 closed 10 months ago

ts2095 commented 12 months ago

Reference Issue

Fixes #1053

What does this implement/fix? Explain your changes.

Sparse DataFrames resulting in sparse matrices are correctly reassembled as sparse DataFrames using DataFrame.sparse.from_spmatrix.

Any other comments?

glemaitre commented 10 months ago

The failures are unrelated.