That's a great tip actually, I was unaware about the MultiOutputClassifier
option. I'll give it a try!
Thanks,
Liam
On Wed, Apr 10, 2019 at 11:03 PM Joel Nothman
wrote:
> I think it's a bit weird if we're returning sparse output from
> OneVsRestClassifier.predict if it wasn't fit on sparse Y.
I think it's a bit weird if we're returning sparse output from
OneVsRestClassifier.predict if it wasn't fit on sparse Y.
Actually, I would be in favour of deprecating multilabel support in
OneVsRestClassifier, since it is performing "binary relevance method" for
multilabel, not actually OvR. Multi
Unfortunately I don't believe that you get that level of freedom, it's an
API call that automatically calls the model's predict method so I don't
think that I get to specify something like model.predict(X).toarray(). I
could be wrong however, I don't pretend to be an expert on Cloud ML by any
stret
Hm, weird that their platform seems to be so picky about it. Have you tried to
just make the output of the pipeline dense? I.e.,
(model.predict(X)).toarray()
Best,
Sebastian
> On Apr 10, 2019, at 1:10 PM, Liam Geron wrote:
>
> Hi Sebastian,
>
> Thanks for the advice! The model actually work
Hi Sebastian,
Thanks for the advice! The model actually works on it's own in python fine
luckily, so I don't think that that is the issue exactly. I have tried
rolling my own estimator to wrap the pipeline to have it call the
predict_proba method to return a dense array, however I then came across
Hi Liam,
not sure what your exact error message is, but it may also be that the
XGBClassifier only accepts dense arrays? I think the TfidfVectorizer returns
sparse arrays. You could probably fix your issues by inserting a
"DenseTransformer" into your pipelone (a simple class that just transform
Hi all,
I was hoping to get some guidance re: changing the result of the predict
method of the OneVsRestClassifier to return a dense array rather than a
sparse array, given that Google Cloud ML only accepts dense numpy arrays as
a result of a given models predict method. Right now my model archite