[scikit-learn] intermediate data state in a Pipeline

g.lemaitre58 at gmail.com g.lemaitre58 at gmail.com
Mon Apr 11 16:26:26 EDT 2022


Using slicing: model[:-1].transform(X)

Sent from my iPhone

> On 11 Apr 2022, at 20:24, Sole Galli via scikit-learn <scikit-learn at python.org> wrote:
> 
> 
> Hello community,
> 
> Say I have a pipeline with 3 data transformations, i.e., SimpleImputer, OrdinalEncoder and StandardScaler, and a Lasso at the end. And I want to obtain a copy of the transformed data that would be input to the Lasso.
> 
> Is there a way other than selecting all the steps of the pipeline prior to the Lasso and applying transform sequentially? 
> 
> Thank you!
> 
> Sent with ProtonMail secure email.
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20220411/2b702c21/attachment.html>


More information about the scikit-learn mailing list