[scikit-learn] Issue regarding Feature Union

mitali katoch mitalikatoch at gmail.com
Thu May 6 05:51:12 EDT 2021


  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',

 SelectFromModel(estimator=LogisticRegression(C=1,

                  penalty='l1',

                  solver='liblinear'),

 max_features=100))]
)),
                ('sampler', SMOTE(k_neighbors=2, random_state=10)),
                ('model', SVC(random_state=10))]
)

I would like to extract those SelectKBest(k=500) and max_features=100 from
the pipeline.

Could you please confirm whether it is possible to do it, If yes, could you
share the solution, I would highly appreciate that.

Thanks in advance.

Best Regards,
Mitali Katoch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20210506/094ac0d3/attachment.html>


More information about the scikit-learn mailing list