How to obtain original coefficients after performing linear regression on normalized data?Stock Price Data Manipulation for LSTMHow to use the output of GridSearch?Summary statistics by category using PythonOutlier detection with sklearnObtaining a confidence interval for the prediction of a linear regressionNeural Network Data Normalization Setupsklearn preprocessing MinMaxScalerHow to plot logistic regression decision boundary?How do I implement stochastic gradient descent correctly?How to visualize multivariate regression results by plotting plane of best fit?

Upside-Down Pyramid Addition...REVERSED!

Can fracking help reduce CO2?

CRT Oscilloscope - part of the plot is missing

Why was the battle set up *outside* Winterfell?

If Earth is tilted, why is Polaris always above the same spot?

Why is B♯ higher than C♭ in 31-ET?

Python password manager

Where can I go to avoid planes overhead?

Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?

Why is `abs()` implemented differently?

Help to understand a simple example of clist in expl3

If a prion is a protein, why is it not disassembled by the digestive system?

I caught several of my students plagiarizing. Could it be my fault as a teacher?

My ID is expired, can I fly to the Bahamas with my passport?

Number of seconds in 6 weeks

Roll Dice to get a random number between 1 and 150

Identifying my late father's D&D stuff found in the attic

How to make a newline without autoindent

Should I replace my bicycle tires if they have not been inflated in multiple years

Am I getting DDOS from crawlers?

Why wasn't the Night King naked in S08E03?

How do I tell my manager that his code review comment is wrong?

Should one double the thirds or the fifth in chords?

Would glacier 'trees' be plausible?



How to obtain original coefficients after performing linear regression on normalized data?


Stock Price Data Manipulation for LSTMHow to use the output of GridSearch?Summary statistics by category using PythonOutlier detection with sklearnObtaining a confidence interval for the prediction of a linear regressionNeural Network Data Normalization Setupsklearn preprocessing MinMaxScalerHow to plot logistic regression decision boundary?How do I implement stochastic gradient descent correctly?How to visualize multivariate regression results by plotting plane of best fit?













1












$begingroup$


I am reading data from a file using pandas which looks like this:



data.head()

ldr1 ldr2 servo
0 971 956 -2
1 691 825 -105
2 841 963 -26
3 970 731 44
4 755 939 -69


I proceed to normalize this data to perform gradient descent:



my_data = (my_data - my_data.mean())/my_data.std()
my_data.head()

ldr1 ldr2 servo
0 1.419949 1.289668 0.366482
1 -0.242834 0.591311 -1.580420
2 0.647943 1.326984 -0.087165
3 1.414011 0.090200 1.235972
4 0.137231 1.199041 -0.899949


I perform multivariate regression and end up with fitted parameters on the normalized data:



Thetas: [[-3.86865143e-17, 8.47885685e-01, -5.39083511e-01]]


I would like to plot the plane of best fit on the original data and not the normalized data using the normalized thetas.



I used scipy.optimize.curve_fit to perform multivariate linear regression and come up with the optimal fitted parameters. I know that the original thetas should be close to the following:



[ 0.26654135 -0.15218007 -107.79915373]


How can I get the 'original' thetas for the original data-set in order to plot, without using Scikit-Learn?



Any suggestions will be appreciated.










share|improve this question











$endgroup$
















    1












    $begingroup$


    I am reading data from a file using pandas which looks like this:



    data.head()

    ldr1 ldr2 servo
    0 971 956 -2
    1 691 825 -105
    2 841 963 -26
    3 970 731 44
    4 755 939 -69


    I proceed to normalize this data to perform gradient descent:



    my_data = (my_data - my_data.mean())/my_data.std()
    my_data.head()

    ldr1 ldr2 servo
    0 1.419949 1.289668 0.366482
    1 -0.242834 0.591311 -1.580420
    2 0.647943 1.326984 -0.087165
    3 1.414011 0.090200 1.235972
    4 0.137231 1.199041 -0.899949


    I perform multivariate regression and end up with fitted parameters on the normalized data:



    Thetas: [[-3.86865143e-17, 8.47885685e-01, -5.39083511e-01]]


    I would like to plot the plane of best fit on the original data and not the normalized data using the normalized thetas.



    I used scipy.optimize.curve_fit to perform multivariate linear regression and come up with the optimal fitted parameters. I know that the original thetas should be close to the following:



    [ 0.26654135 -0.15218007 -107.79915373]


    How can I get the 'original' thetas for the original data-set in order to plot, without using Scikit-Learn?



    Any suggestions will be appreciated.










    share|improve this question











    $endgroup$














      1












      1








      1





      $begingroup$


      I am reading data from a file using pandas which looks like this:



      data.head()

      ldr1 ldr2 servo
      0 971 956 -2
      1 691 825 -105
      2 841 963 -26
      3 970 731 44
      4 755 939 -69


      I proceed to normalize this data to perform gradient descent:



      my_data = (my_data - my_data.mean())/my_data.std()
      my_data.head()

      ldr1 ldr2 servo
      0 1.419949 1.289668 0.366482
      1 -0.242834 0.591311 -1.580420
      2 0.647943 1.326984 -0.087165
      3 1.414011 0.090200 1.235972
      4 0.137231 1.199041 -0.899949


      I perform multivariate regression and end up with fitted parameters on the normalized data:



      Thetas: [[-3.86865143e-17, 8.47885685e-01, -5.39083511e-01]]


      I would like to plot the plane of best fit on the original data and not the normalized data using the normalized thetas.



      I used scipy.optimize.curve_fit to perform multivariate linear regression and come up with the optimal fitted parameters. I know that the original thetas should be close to the following:



      [ 0.26654135 -0.15218007 -107.79915373]


      How can I get the 'original' thetas for the original data-set in order to plot, without using Scikit-Learn?



      Any suggestions will be appreciated.










      share|improve this question











      $endgroup$




      I am reading data from a file using pandas which looks like this:



      data.head()

      ldr1 ldr2 servo
      0 971 956 -2
      1 691 825 -105
      2 841 963 -26
      3 970 731 44
      4 755 939 -69


      I proceed to normalize this data to perform gradient descent:



      my_data = (my_data - my_data.mean())/my_data.std()
      my_data.head()

      ldr1 ldr2 servo
      0 1.419949 1.289668 0.366482
      1 -0.242834 0.591311 -1.580420
      2 0.647943 1.326984 -0.087165
      3 1.414011 0.090200 1.235972
      4 0.137231 1.199041 -0.899949


      I perform multivariate regression and end up with fitted parameters on the normalized data:



      Thetas: [[-3.86865143e-17, 8.47885685e-01, -5.39083511e-01]]


      I would like to plot the plane of best fit on the original data and not the normalized data using the normalized thetas.



      I used scipy.optimize.curve_fit to perform multivariate linear regression and come up with the optimal fitted parameters. I know that the original thetas should be close to the following:



      [ 0.26654135 -0.15218007 -107.79915373]


      How can I get the 'original' thetas for the original data-set in order to plot, without using Scikit-Learn?



      Any suggestions will be appreciated.







      machine-learning python






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 25 at 11:03









      Esmailian

      4,114422




      4,114422










      asked Apr 23 at 9:08









      Rrz0Rrz0

      1979




      1979




















          1 Answer
          1






          active

          oldest

          votes


















          3












          $begingroup$

          Coefficients of the linear regression for unnormalized features



          If parameters in the normalized space are denoted as $(theta_0', theta_1', theta_2')$, parameters in the original space $(theta_0, theta_1, theta_2)$ can be derived as follows
          $$beginalign*
          y' &= theta_2'x_2'+theta_1'x_1'+theta_0'\
          fracy-mu_Ysigma_Y &= theta_2'fracx_2 - mu_X_2sigma_X_2 + theta_1'fracx_1 - mu_X_1sigma_X_1 +theta_0' \
          y &= overbraceleft(fracsigma_Ysigma_X_2theta_2'right)^theta_2x_2+ overbraceleft(fracsigma_Ysigma_X_1theta_1'right)^theta_1x_1
          + overbracesigma_Yleft(-theta_2'fracmu_X_2sigma_X_2-theta_1'fracmu_X_1sigma_X_1 + theta_0'right) + mu_Y^theta_0
          endalign*$$



          Generalization to D features



          $$beginalign*
          theta_d = left{beginmatrix
          sigma_Y left(theta_0' - sum_i=1^Dtheta_i'fracmu_X_isigma_X_i right) + mu_Y& d=0\
          fracsigma_Ysigma_X_dtheta_d' & d > 0
          endmatrixright.
          endalign*$$



          A trick



          For visualization, we can plot the plane in original, un-normalized space without changing the parameters (Thetas). We only need to re-label (re-scale) the plot axes.



          For example, a point $(x_1', x_2', y')$ in the normalized space corresponds to point $$(x_1, x_2, y)=(sigma_X_1x_1'+mu_X_1, sigma_X_2x_2'+mu_X_2, sigma_Yy'+mu_Y)$$



          in the original space. So you just need to rename the plot axes from $(x_1', x_2', y')$ to $(x_1, x_2, y)$.



          Note that $y'=theta_2'x_2'+theta_1'x_1'+theta_0'$ is still calculated using normalized features.






          share|improve this answer











          $endgroup$












          • $begingroup$
            Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
            $endgroup$
            – Rrz0
            Apr 23 at 12:52






          • 1




            $begingroup$
            @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
            $endgroup$
            – Esmailian
            Apr 23 at 12:59











          • $begingroup$
            Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
            $endgroup$
            – Rrz0
            Apr 23 at 13:06






          • 1




            $begingroup$
            @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
            $endgroup$
            – Esmailian
            Apr 23 at 14:02






          • 1




            $begingroup$
            @Rrz0 remove $x_2$, it should not be included
            $endgroup$
            – Esmailian
            Apr 23 at 14:48











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f49765%2fhow-to-obtain-original-coefficients-after-performing-linear-regression-on-normal%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3












          $begingroup$

          Coefficients of the linear regression for unnormalized features



          If parameters in the normalized space are denoted as $(theta_0', theta_1', theta_2')$, parameters in the original space $(theta_0, theta_1, theta_2)$ can be derived as follows
          $$beginalign*
          y' &= theta_2'x_2'+theta_1'x_1'+theta_0'\
          fracy-mu_Ysigma_Y &= theta_2'fracx_2 - mu_X_2sigma_X_2 + theta_1'fracx_1 - mu_X_1sigma_X_1 +theta_0' \
          y &= overbraceleft(fracsigma_Ysigma_X_2theta_2'right)^theta_2x_2+ overbraceleft(fracsigma_Ysigma_X_1theta_1'right)^theta_1x_1
          + overbracesigma_Yleft(-theta_2'fracmu_X_2sigma_X_2-theta_1'fracmu_X_1sigma_X_1 + theta_0'right) + mu_Y^theta_0
          endalign*$$



          Generalization to D features



          $$beginalign*
          theta_d = left{beginmatrix
          sigma_Y left(theta_0' - sum_i=1^Dtheta_i'fracmu_X_isigma_X_i right) + mu_Y& d=0\
          fracsigma_Ysigma_X_dtheta_d' & d > 0
          endmatrixright.
          endalign*$$



          A trick



          For visualization, we can plot the plane in original, un-normalized space without changing the parameters (Thetas). We only need to re-label (re-scale) the plot axes.



          For example, a point $(x_1', x_2', y')$ in the normalized space corresponds to point $$(x_1, x_2, y)=(sigma_X_1x_1'+mu_X_1, sigma_X_2x_2'+mu_X_2, sigma_Yy'+mu_Y)$$



          in the original space. So you just need to rename the plot axes from $(x_1', x_2', y')$ to $(x_1, x_2, y)$.



          Note that $y'=theta_2'x_2'+theta_1'x_1'+theta_0'$ is still calculated using normalized features.






          share|improve this answer











          $endgroup$












          • $begingroup$
            Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
            $endgroup$
            – Rrz0
            Apr 23 at 12:52






          • 1




            $begingroup$
            @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
            $endgroup$
            – Esmailian
            Apr 23 at 12:59











          • $begingroup$
            Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
            $endgroup$
            – Rrz0
            Apr 23 at 13:06






          • 1




            $begingroup$
            @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
            $endgroup$
            – Esmailian
            Apr 23 at 14:02






          • 1




            $begingroup$
            @Rrz0 remove $x_2$, it should not be included
            $endgroup$
            – Esmailian
            Apr 23 at 14:48















          3












          $begingroup$

          Coefficients of the linear regression for unnormalized features



          If parameters in the normalized space are denoted as $(theta_0', theta_1', theta_2')$, parameters in the original space $(theta_0, theta_1, theta_2)$ can be derived as follows
          $$beginalign*
          y' &= theta_2'x_2'+theta_1'x_1'+theta_0'\
          fracy-mu_Ysigma_Y &= theta_2'fracx_2 - mu_X_2sigma_X_2 + theta_1'fracx_1 - mu_X_1sigma_X_1 +theta_0' \
          y &= overbraceleft(fracsigma_Ysigma_X_2theta_2'right)^theta_2x_2+ overbraceleft(fracsigma_Ysigma_X_1theta_1'right)^theta_1x_1
          + overbracesigma_Yleft(-theta_2'fracmu_X_2sigma_X_2-theta_1'fracmu_X_1sigma_X_1 + theta_0'right) + mu_Y^theta_0
          endalign*$$



          Generalization to D features



          $$beginalign*
          theta_d = left{beginmatrix
          sigma_Y left(theta_0' - sum_i=1^Dtheta_i'fracmu_X_isigma_X_i right) + mu_Y& d=0\
          fracsigma_Ysigma_X_dtheta_d' & d > 0
          endmatrixright.
          endalign*$$



          A trick



          For visualization, we can plot the plane in original, un-normalized space without changing the parameters (Thetas). We only need to re-label (re-scale) the plot axes.



          For example, a point $(x_1', x_2', y')$ in the normalized space corresponds to point $$(x_1, x_2, y)=(sigma_X_1x_1'+mu_X_1, sigma_X_2x_2'+mu_X_2, sigma_Yy'+mu_Y)$$



          in the original space. So you just need to rename the plot axes from $(x_1', x_2', y')$ to $(x_1, x_2, y)$.



          Note that $y'=theta_2'x_2'+theta_1'x_1'+theta_0'$ is still calculated using normalized features.






          share|improve this answer











          $endgroup$












          • $begingroup$
            Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
            $endgroup$
            – Rrz0
            Apr 23 at 12:52






          • 1




            $begingroup$
            @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
            $endgroup$
            – Esmailian
            Apr 23 at 12:59











          • $begingroup$
            Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
            $endgroup$
            – Rrz0
            Apr 23 at 13:06






          • 1




            $begingroup$
            @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
            $endgroup$
            – Esmailian
            Apr 23 at 14:02






          • 1




            $begingroup$
            @Rrz0 remove $x_2$, it should not be included
            $endgroup$
            – Esmailian
            Apr 23 at 14:48













          3












          3








          3





          $begingroup$

          Coefficients of the linear regression for unnormalized features



          If parameters in the normalized space are denoted as $(theta_0', theta_1', theta_2')$, parameters in the original space $(theta_0, theta_1, theta_2)$ can be derived as follows
          $$beginalign*
          y' &= theta_2'x_2'+theta_1'x_1'+theta_0'\
          fracy-mu_Ysigma_Y &= theta_2'fracx_2 - mu_X_2sigma_X_2 + theta_1'fracx_1 - mu_X_1sigma_X_1 +theta_0' \
          y &= overbraceleft(fracsigma_Ysigma_X_2theta_2'right)^theta_2x_2+ overbraceleft(fracsigma_Ysigma_X_1theta_1'right)^theta_1x_1
          + overbracesigma_Yleft(-theta_2'fracmu_X_2sigma_X_2-theta_1'fracmu_X_1sigma_X_1 + theta_0'right) + mu_Y^theta_0
          endalign*$$



          Generalization to D features



          $$beginalign*
          theta_d = left{beginmatrix
          sigma_Y left(theta_0' - sum_i=1^Dtheta_i'fracmu_X_isigma_X_i right) + mu_Y& d=0\
          fracsigma_Ysigma_X_dtheta_d' & d > 0
          endmatrixright.
          endalign*$$



          A trick



          For visualization, we can plot the plane in original, un-normalized space without changing the parameters (Thetas). We only need to re-label (re-scale) the plot axes.



          For example, a point $(x_1', x_2', y')$ in the normalized space corresponds to point $$(x_1, x_2, y)=(sigma_X_1x_1'+mu_X_1, sigma_X_2x_2'+mu_X_2, sigma_Yy'+mu_Y)$$



          in the original space. So you just need to rename the plot axes from $(x_1', x_2', y')$ to $(x_1, x_2, y)$.



          Note that $y'=theta_2'x_2'+theta_1'x_1'+theta_0'$ is still calculated using normalized features.






          share|improve this answer











          $endgroup$



          Coefficients of the linear regression for unnormalized features



          If parameters in the normalized space are denoted as $(theta_0', theta_1', theta_2')$, parameters in the original space $(theta_0, theta_1, theta_2)$ can be derived as follows
          $$beginalign*
          y' &= theta_2'x_2'+theta_1'x_1'+theta_0'\
          fracy-mu_Ysigma_Y &= theta_2'fracx_2 - mu_X_2sigma_X_2 + theta_1'fracx_1 - mu_X_1sigma_X_1 +theta_0' \
          y &= overbraceleft(fracsigma_Ysigma_X_2theta_2'right)^theta_2x_2+ overbraceleft(fracsigma_Ysigma_X_1theta_1'right)^theta_1x_1
          + overbracesigma_Yleft(-theta_2'fracmu_X_2sigma_X_2-theta_1'fracmu_X_1sigma_X_1 + theta_0'right) + mu_Y^theta_0
          endalign*$$



          Generalization to D features



          $$beginalign*
          theta_d = left{beginmatrix
          sigma_Y left(theta_0' - sum_i=1^Dtheta_i'fracmu_X_isigma_X_i right) + mu_Y& d=0\
          fracsigma_Ysigma_X_dtheta_d' & d > 0
          endmatrixright.
          endalign*$$



          A trick



          For visualization, we can plot the plane in original, un-normalized space without changing the parameters (Thetas). We only need to re-label (re-scale) the plot axes.



          For example, a point $(x_1', x_2', y')$ in the normalized space corresponds to point $$(x_1, x_2, y)=(sigma_X_1x_1'+mu_X_1, sigma_X_2x_2'+mu_X_2, sigma_Yy'+mu_Y)$$



          in the original space. So you just need to rename the plot axes from $(x_1', x_2', y')$ to $(x_1, x_2, y)$.



          Note that $y'=theta_2'x_2'+theta_1'x_1'+theta_0'$ is still calculated using normalized features.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 23 at 16:36

























          answered Apr 23 at 10:52









          EsmailianEsmailian

          4,114422




          4,114422











          • $begingroup$
            Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
            $endgroup$
            – Rrz0
            Apr 23 at 12:52






          • 1




            $begingroup$
            @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
            $endgroup$
            – Esmailian
            Apr 23 at 12:59











          • $begingroup$
            Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
            $endgroup$
            – Rrz0
            Apr 23 at 13:06






          • 1




            $begingroup$
            @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
            $endgroup$
            – Esmailian
            Apr 23 at 14:02






          • 1




            $begingroup$
            @Rrz0 remove $x_2$, it should not be included
            $endgroup$
            – Esmailian
            Apr 23 at 14:48
















          • $begingroup$
            Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
            $endgroup$
            – Rrz0
            Apr 23 at 12:52






          • 1




            $begingroup$
            @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
            $endgroup$
            – Esmailian
            Apr 23 at 12:59











          • $begingroup$
            Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
            $endgroup$
            – Rrz0
            Apr 23 at 13:06






          • 1




            $begingroup$
            @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
            $endgroup$
            – Esmailian
            Apr 23 at 14:02






          • 1




            $begingroup$
            @Rrz0 remove $x_2$, it should not be included
            $endgroup$
            – Esmailian
            Apr 23 at 14:48















          $begingroup$
          Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
          $endgroup$
          – Rrz0
          Apr 23 at 12:52




          $begingroup$
          Thank you, this helps! I will try your suggestions and get back to you. Confirming that I understood correctly, in reference to your last equation, should I multiply the standard deviation of both normalized and original parameters and add to it the variance of the original parameter?
          $endgroup$
          – Rrz0
          Apr 23 at 12:52




          1




          1




          $begingroup$
          @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
          $endgroup$
          – Esmailian
          Apr 23 at 12:59





          $begingroup$
          @Rrz0 There is no variance or std for parameters $theta$. $sigma$ and $mu$ are calculated from original data.
          $endgroup$
          – Esmailian
          Apr 23 at 12:59













          $begingroup$
          Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
          $endgroup$
          – Rrz0
          Apr 23 at 13:06




          $begingroup$
          Right, thanks for confirming. I am still not able to visualize the proper plane. I managed to convert the normalized data into the original space, however the plane appears incorrectly. I edited the question.
          $endgroup$
          – Rrz0
          Apr 23 at 13:06




          1




          1




          $begingroup$
          @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
          $endgroup$
          – Esmailian
          Apr 23 at 14:02




          $begingroup$
          @Rrz0 you should plot (x_scaled, y_scaled, z_scaled), also check out the manual on plot_surface maybe that is the problem, see whether you can plot an arbitrary surface. I suggest also implementing the first approach to better find the problem.
          $endgroup$
          – Esmailian
          Apr 23 at 14:02




          1




          1




          $begingroup$
          @Rrz0 remove $x_2$, it should not be included
          $endgroup$
          – Esmailian
          Apr 23 at 14:48




          $begingroup$
          @Rrz0 remove $x_2$, it should not be included
          $endgroup$
          – Esmailian
          Apr 23 at 14:48

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f49765%2fhow-to-obtain-original-coefficients-after-performing-linear-regression-on-normal%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

          Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

          What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company