[scikit-learn] Issue regarding Feature Union

2021-05-06 Thread mitali katoch
Dear Scikit team, I am working with FeatureUnion in the pipeline and best parameters are as follows: Pipeline(steps=[('feature_sel', FeatureUnion(transformer_list= [ ('selectk', SelectKBest(k=500)), ('sel_fromModel', SelectFromMo

Re: [scikit-learn] Issue regarding Feature Union

2021-05-06 Thread Chris Aridas
Hi, Assuming that you have trained your pipeline, the following piece of code should work. pipeline.named_steps["feature_sel"].transform(X) Best, Chris On Thu, May 6, 2021 at 12:52 PM mitali katoch wrote: > Dear Scikit team, > > I am working with FeatureUnion in the pipeline and best param

Re: [scikit-learn] Issue regarding Feature Union

2021-05-06 Thread mitali katoch
Hi Chris, I forgot to mention that this pipeline I have used within the GridSearchCV. I have done what you suggested early but didn't work, it said: 'GridSearchCV' object has no attribute 'named_steps'. I somehow figured out now Thanks for your help though. Best regards, Mitali Katoch On Thu, Ma

Re: [scikit-learn] Issue regarding Feature Union

2021-05-06 Thread Guillaume LemaƮtre
you can get the pipeline (with optimized hyperparameters) using grid_search.best_estimator_. Applying the code of Chris on this estimator will work. On Thu, 6 May 2021 at 13:45, mitali katoch wrote: > Hi Chris, > I forgot to mention that this pipeline I have used within the GridSearchCV. > I hav