adriangb / scikeras

Scikit-Learn API wrapper for Keras.
https://www.adriangb.com/scikeras/
MIT License
239 stars 47 forks source link

Support sparse matrices for X #240

Closed adriangb closed 2 years ago

adriangb commented 3 years ago

Closes #239

codecov-commenter commented 3 years ago

Codecov Report

Merging #240 (38feeca) into master (2c8e9e0) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #240   +/-   ##
=======================================
  Coverage   98.27%   98.28%           
=======================================
  Files           7        7           
  Lines         755      759    +4     
=======================================
+ Hits          742      746    +4     
  Misses         13       13           
Impacted Files Coverage Δ
scikeras/wrappers.py 97.53% <100.00%> (+0.02%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

github-actions[bot] commented 3 years ago

📝 Docs preview for commit 38feeca at: https://www.adriangb.com/scikeras/refs/pull/240/merge/

adriangb commented 2 years ago

Todo: update docs, maybe an example notebook?

mattalhonte-srm commented 2 years ago

Heya! Just tested this and it doesn't work for me - converting it to lil makes the container blow up when I try to train, I need the csr matrix to stay a CSR matrix (TF can do much more efficient math on those!). The thing that worked for me was just passing accept_sparse=True and 0 other code changes. Thanks!

adriangb commented 2 years ago

Ouch. I forget why I had to put the conversion in there (I mean, there's a comment, but I'm sure some test failed).