return coefficients from Pipeline object in sklearn

You can always use the names you assigned to them while making the pipeline by using the named_steps dict. scaler = sgd_randomized_pipe.best_estimator_.named_steps[‘scl’] classifier = sgd_randomized_pipe.best_estimator_.named_steps[‘clf’] and then access all the attributes like coef_, intercept_ etc. which are available to corresponding fitted estimator. This is the formal attribute exposed by the Pipeline as specified in the … Read more

Invalid parameter for sklearn estimator pipeline

There should be two underscores between estimator name and it’s parameters in a Pipeline logisticregression__C. Do the same for tfidfvectorizer It is mentioned in the user guide here: https://scikit-learn.org/stable/modules/compose.html#nested-parameters. See the example at https://scikit-learn.org/stable/auto_examples/compose/plot_compare_reduction.html#sphx-glr-auto-examples-compose-plot-compare-reduction-py

tech