I am using Sklearn to build a linear regression model (or any other model) with the following steps:
X_train and Y_train are the training data
Standardize the training data
X_train = preprocessing.scale(X_train)
fit the model
model.fit(X_train, Y_train)
Once the model is fit with scaled data, how can I predict with new data (either one or more data points at a time) using the fit model?
What I am using is
Scale the data
NewData_Scaled = preprocessing.scale(NewData)
Predict the data
PredictedTarget = model.predict(NewData_Scaled)
I think I am missing a transformation function with preprocessing.scale
so that I can save it with the trained model and then apply it on the new unseen data? any help please.