I have a simple use case - I want to, as part of an sklearn pipeline, generate y labels based on X features (e.g. for predicting some signal in X, n timesteps in the future).
I want it to be a pipeline step as I want the label based on the transformed features, so that the final pipeline looks something like the following:
- Transform features X into X'
- Generate labels y based on (past) features of X'
- Fit a model based on X' and y
Based on the sklearn docs there is no official way of doing it. Are there any workarounds?