[scikit-learn] Sparse Input for HistGradientBoostingClassifier

thomasjpfan at gmail.com thomasjpfan at gmail.com
Mon Oct 21 21:50:14 EDT 2019


Currently, it is not implemented. Feel free to open an issue regarding sparse support for HistGradientBoosting.

Thomas

> On Oct 21, 2019, at 9:00 PM, Jason Wolosonovich <jason at refinerynet.com> wrote:
> 
> 
> Hi!
> 
> I'm getting an error when trying to use the HistGradientBoostingClassifier by feeding it the output from CountVectorizer and then TfidfTransformer. The error is:
> 
> TypeError: A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.
> 
> I haven't opened an issue yet because I wanted to get more clarification on whether this just isn't implemented yet or if there is some reason inherent to histogram based boosting that prevents sparse inputs from being used.
> 
> Making the array dense in my case causes me to run out of memory. Thanks in advance!
> 
> -Jason
> 
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20191021/fef4095a/attachment.html>


More information about the scikit-learn mailing list