0
$\begingroup$

I built a linear multivariable regression model from normalized data (for the interval [0; 1]). Initially, the data was not normalized, I normalized the data by myself (independent and dependent variables). I want to use this model to make predictions from newly received data (I get the values ​​of independent variables and I want to predict the value of the dependent variable). The problem is that the data comes in a raw, unnormalized form.

  1. How can I normalize newly arriving data if only one "observation" is received?
  2. What if I want to get the real values ​​of the dependent variable using my model, and not the normalized ones?
$\endgroup$

1 Answer 1

1
$\begingroup$

So, the question asks:

  1. How to normalise incoming (individual observations)
  2. How to get the real value predictions and not the normalised values.
  1. When we do normalisation using the Sci-kit learn module, instead of using the very handy fit_transform() method in the scaler, you could instead perform a .fit() over your original observations and then apply the .transform() to the newly-observed values. Obviously, in this case you need separate scalers foreach feature, as they are distributed differently from one another.

  2. Again in Sci-kit learn, there is an inverse_transform() method which reverts the normalised value back to the original scale.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.