Solved – Denormalizing Data

I am applying Polynomial Regression to my data, however the parameters theta were always =0,
i noticed that my y data or output is too large in the order of 100000 so i normalized y, i got very good predictions.
However what can i do if i need to get the predictions based on the real y values, meaning how can i denormalize ? wont the parameters be wrong afterwards somehow since i got them off of the normalized data ?

Note: i also normalize my input x data

Most techniques for "normalization" are invertible. If you think of your normalization procedure as a function $f$, this means we can find a function $f^{-1}$ such that $y = f^{-1}(f(y))$. This means you can apply $f^{-1}$ to your predicted value to get back to the original "unnormalized" scale, or denormalize the output using your parlance. Here's some common ones.

Standard score $$ begin{align*} f(y) &= frac{y – mu}{sigma}\ f^{-1}(y) &= sigma y + mu end{align*} $$ Scaling [0,1] $$ begin{align*} f(y) &= frac{y – y_min}{y_max – y_min}\ f^{-1}(y) &= y (y_max – y_min) + y_min end{align*} $$

Similar Posts:

Rate this post

Leave a Comment