<p dir="auto">My current use case is to cluster a bunch of data to generate labels, then use a classifier to draw decision boundaries and make label predictions on new data.</p>
<p dir="auto">I love using pipeline and gridsearch packages in tandem, but can't use it for this because clustering does not have a transform method for X. Is it worthwhile to make pipeline components chain-able by the labels_ attribute in addition to transform?</p>
<p dir="auto">Following up on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32306582" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/3113" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/3113/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/3113">#3113</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32285638" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/3112" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/3112/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/3112">#3112</a>, what about arbitrary transforms to the <code class="notranslate">y</code> values? Those issues dealt primarily with "label transforms"  but I would like to use transformers to mean or range center the <code class="notranslate">y</code> values as well.</p>
<p dir="auto">Ideally I would have some transform that can be applied to the y values before fitting and then applied in the inverse to the predicted <code class="notranslate">y</code> values coming out of <code class="notranslate">predict</code>.</p>
<p dir="auto">Ideally this Transformer could be added to a pipeline.</p>
<p dir="auto">Currently the signature for <code class="notranslate">transform</code> for <a href="https://github.com/scikit-learn/scikit-learn/blob/a413f875f1a7c9528290e01e1c030c336b9f32e4/sklearn/preprocessing/data.py#L338"><code class="notranslate">StandardScaler</code></a> allows for transforming <code class="notranslate">y</code> but as pointed out in the linked issues, not all transform methods have a signature allowing for a <code class="notranslate">y</code> to be passed in.</p>
<p dir="auto">Further even for <code class="notranslate">StandardScaler</code> there is an inconsistency with the <a href="https://github.com/scikit-learn/scikit-learn/blob/a413f875f1a7c9528290e01e1c030c336b9f32e4/sklearn/preprocessing/data.py#L366"><code class="notranslate">inverse_transform</code></a> NOT taking <code class="notranslate">y</code>.</p>