I've create a pipeline as follows (using the Keras Scikit-Learn API)
estimators = []
estimators.append(('standardize', StandardScaler()))
estimators.append(('mlp', KerasRegressor(build_fn=baseline_model, nb_epoch=50, batch_size=5, verbose=0)))
pipeline = Pipeline(estimators)
and fit it with
pipeline.fit(trainX,trainY)
If I predict with pipline.predict(testX)
, I (believe) I get standardised predictions.
How do I predict on testX
so that predictedY
it at the same scale as the actual (untouched) testY
(i.e. NOT standardised prediction, but instead the actual values)? I see there is an inverse_transform
method for Pipeline, however appears to be for only reverting a transformed X
.
fit
method - I'm now thinking the transforms only occur on the input featuresX
and notY
(hence the fitted model is on non-standardisedY
), so thepredict
method produces non-standardised predictions?