That's right. The Scaler () standard in the pipeline displays only inputs (trainX) pipe.fit (trainX, trainY).
So, if you approach your model to get closer to training, and you also need to standardize it, you should display your training as
scalerY = StandardScaler().fit(trainY)
The inverse_transform () function displays its values ββtaking into account the standard deviation and the average value calculated in the standard standard (). fit ().
You can always fit your model without scaling Y, as you mentioned, but it can be dangerous depending on your data, as it can lead your model to redo. You should check this out;)
source share