Re: [Scikit-learn-general] Problem with stacking text and binary features in FeatureUnion

2014-08-30 Thread Joel Nothman
On the other hand I can't seem to replicate your error. On 30 August 2014 21:56, Joel Nothman wrote: > That's not a solution I'm happy with :s > > > On 30 August 2014 21:35, Lakomkin Egor wrote: > >> Joel, >> >> Thank you for your reply. I fixed the problem with defining my own >> transformer,

Re: [Scikit-learn-general] Problem with stacking text and binary features in FeatureUnion

2014-08-30 Thread Joel Nothman
That's not a solution I'm happy with :s On 30 August 2014 21:35, Lakomkin Egor wrote: > Joel, > > Thank you for your reply. I fixed the problem with defining my own > transformer, that does the same function as Binarizer, but produces sparse > matrix. > > Regards, Egor > > > 2014-08-30 18:07 GM

Re: [Scikit-learn-general] Problem with stacking text and binary features in FeatureUnion

2014-08-30 Thread Lakomkin Egor
Joel, Thank you for your reply. I fixed the problem with defining my own transformer, that does the same function as Binarizer, but produces sparse matrix. Regards, Egor 2014-08-30 18:07 GMT+08:00 Joel Nothman : > I cannot immediately tell why this doesn't work. > > Firstly, I assume (and hope

Re: [Scikit-learn-general] Problem with stacking text and binary features in FeatureUnion

2014-08-30 Thread Joel Nothman
I cannot immediately tell why this doesn't work. Firstly, I assume (and hope) it has nothing to do with transformer_weights. Check that removing this still results in the error. The error implies that the transformers (pipelines) are producing data of different shape. Perhaps adding another trans

[Scikit-learn-general] Problem with stacking text and binary features in FeatureUnion

2014-08-29 Thread Lakomkin Egor
Hi all, I have heterogeneous data with text and binary features and I try to handle it in FeatureUnion. I use HashingVectorizer for text data and Binarizer for integer data(i need only know if the value of the feature > 0). The problem is that the naive code that I have written did not work out o