Confused about the terminology of least regression squares











up vote
2
down vote

favorite
1












I am confused by the language of my math text book where it says $hat y = alpha times$basis function summation from $i=1$ to $n$? What are basis functions? And why does it says there are more data points than basis functions? I know how to derive $alpha$ using linear algebra and calculus by using $mx + c$ as the equation of the regression line.



Also I am a bit confused on the fact that how does it know that the smaller distance of the actual data point and $hat y$ is perpendicular to the line of $hat y$? I will be very very grateful if anyone can help me with this.










share|cite|improve this question









New contributor




codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    2
    down vote

    favorite
    1












    I am confused by the language of my math text book where it says $hat y = alpha times$basis function summation from $i=1$ to $n$? What are basis functions? And why does it says there are more data points than basis functions? I know how to derive $alpha$ using linear algebra and calculus by using $mx + c$ as the equation of the regression line.



    Also I am a bit confused on the fact that how does it know that the smaller distance of the actual data point and $hat y$ is perpendicular to the line of $hat y$? I will be very very grateful if anyone can help me with this.










    share|cite|improve this question









    New contributor




    codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      2
      down vote

      favorite
      1









      up vote
      2
      down vote

      favorite
      1






      1





      I am confused by the language of my math text book where it says $hat y = alpha times$basis function summation from $i=1$ to $n$? What are basis functions? And why does it says there are more data points than basis functions? I know how to derive $alpha$ using linear algebra and calculus by using $mx + c$ as the equation of the regression line.



      Also I am a bit confused on the fact that how does it know that the smaller distance of the actual data point and $hat y$ is perpendicular to the line of $hat y$? I will be very very grateful if anyone can help me with this.










      share|cite|improve this question









      New contributor




      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am confused by the language of my math text book where it says $hat y = alpha times$basis function summation from $i=1$ to $n$? What are basis functions? And why does it says there are more data points than basis functions? I know how to derive $alpha$ using linear algebra and calculus by using $mx + c$ as the equation of the regression line.



      Also I am a bit confused on the fact that how does it know that the smaller distance of the actual data point and $hat y$ is perpendicular to the line of $hat y$? I will be very very grateful if anyone can help me with this.







      calculus linear-algebra matlab least-squares






      share|cite|improve this question









      New contributor




      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|cite|improve this question









      New contributor




      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|cite|improve this question




      share|cite|improve this question








      edited Dec 1 at 13:06









      Rócherz

      2,6962721




      2,6962721






      New contributor




      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Dec 1 at 12:57









      codelearner

      132




      132




      New contributor




      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      codelearner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          You are approximating the data points with a linear combination of independent functions. In the case of the straight line of equation



          $$y=mx+p$$



          there are two functions which are the identity,



          $$y=x$$ and the unit,



          $$y=1.$$



          You can generalize with more functions, such as the powers $x^2,x^3,cdots$ or any other. Basis function comes from the terminology of linear algebra.



          Every data point lets you write an equation, such as



          $$(x_k,y_k)to y_k=mx_k+p.$$



          When there are more points than basis functions, i.e. than unknown coefficients, the system is overdeterminate and has no solution. In this case, you try to find a good compromise, i.e. one that approximately satisfies all equations.





          Notice that the minimization via the model $y=mx+p$ does not achieve the minimum distance to the lines, but the vertical distance to the line. See total least squares for the former. https://en.wikipedia.org/wiki/Total_least_squares






          share|cite|improve this answer




























            up vote
            2
            down vote













            A model which is linear with respect to the parameters write
            $$y=sum_{k=1}^n a_k,f_k(x)$$ and the $f_k(x)$ are the $k$ basis functions.



            Suppose that you want to fit data to the model
            $$y=a_0+a_1sin(x)+a_2log(x)+a_3 e^{-pi x}$$ Define $t_i=sin(x_i)$, $u=log(x_i)$, $v=e^{-pi x_i}$. So the model is just
            $$y=a_0+a_1t+a_2u+a_3v$$ which corresponds to a multilinear regression.






            share|cite|improve this answer























              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "69"
              };
              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',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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
              },
              noCode: true, onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });






              codelearner is a new contributor. Be nice, and check out our Code of Conduct.










              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021311%2fconfused-about-the-terminology-of-least-regression-squares%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote













              You are approximating the data points with a linear combination of independent functions. In the case of the straight line of equation



              $$y=mx+p$$



              there are two functions which are the identity,



              $$y=x$$ and the unit,



              $$y=1.$$



              You can generalize with more functions, such as the powers $x^2,x^3,cdots$ or any other. Basis function comes from the terminology of linear algebra.



              Every data point lets you write an equation, such as



              $$(x_k,y_k)to y_k=mx_k+p.$$



              When there are more points than basis functions, i.e. than unknown coefficients, the system is overdeterminate and has no solution. In this case, you try to find a good compromise, i.e. one that approximately satisfies all equations.





              Notice that the minimization via the model $y=mx+p$ does not achieve the minimum distance to the lines, but the vertical distance to the line. See total least squares for the former. https://en.wikipedia.org/wiki/Total_least_squares






              share|cite|improve this answer

























                up vote
                2
                down vote













                You are approximating the data points with a linear combination of independent functions. In the case of the straight line of equation



                $$y=mx+p$$



                there are two functions which are the identity,



                $$y=x$$ and the unit,



                $$y=1.$$



                You can generalize with more functions, such as the powers $x^2,x^3,cdots$ or any other. Basis function comes from the terminology of linear algebra.



                Every data point lets you write an equation, such as



                $$(x_k,y_k)to y_k=mx_k+p.$$



                When there are more points than basis functions, i.e. than unknown coefficients, the system is overdeterminate and has no solution. In this case, you try to find a good compromise, i.e. one that approximately satisfies all equations.





                Notice that the minimization via the model $y=mx+p$ does not achieve the minimum distance to the lines, but the vertical distance to the line. See total least squares for the former. https://en.wikipedia.org/wiki/Total_least_squares






                share|cite|improve this answer























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  You are approximating the data points with a linear combination of independent functions. In the case of the straight line of equation



                  $$y=mx+p$$



                  there are two functions which are the identity,



                  $$y=x$$ and the unit,



                  $$y=1.$$



                  You can generalize with more functions, such as the powers $x^2,x^3,cdots$ or any other. Basis function comes from the terminology of linear algebra.



                  Every data point lets you write an equation, such as



                  $$(x_k,y_k)to y_k=mx_k+p.$$



                  When there are more points than basis functions, i.e. than unknown coefficients, the system is overdeterminate and has no solution. In this case, you try to find a good compromise, i.e. one that approximately satisfies all equations.





                  Notice that the minimization via the model $y=mx+p$ does not achieve the minimum distance to the lines, but the vertical distance to the line. See total least squares for the former. https://en.wikipedia.org/wiki/Total_least_squares






                  share|cite|improve this answer












                  You are approximating the data points with a linear combination of independent functions. In the case of the straight line of equation



                  $$y=mx+p$$



                  there are two functions which are the identity,



                  $$y=x$$ and the unit,



                  $$y=1.$$



                  You can generalize with more functions, such as the powers $x^2,x^3,cdots$ or any other. Basis function comes from the terminology of linear algebra.



                  Every data point lets you write an equation, such as



                  $$(x_k,y_k)to y_k=mx_k+p.$$



                  When there are more points than basis functions, i.e. than unknown coefficients, the system is overdeterminate and has no solution. In this case, you try to find a good compromise, i.e. one that approximately satisfies all equations.





                  Notice that the minimization via the model $y=mx+p$ does not achieve the minimum distance to the lines, but the vertical distance to the line. See total least squares for the former. https://en.wikipedia.org/wiki/Total_least_squares







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered 2 days ago









                  Yves Daoust

                  122k668218




                  122k668218






















                      up vote
                      2
                      down vote













                      A model which is linear with respect to the parameters write
                      $$y=sum_{k=1}^n a_k,f_k(x)$$ and the $f_k(x)$ are the $k$ basis functions.



                      Suppose that you want to fit data to the model
                      $$y=a_0+a_1sin(x)+a_2log(x)+a_3 e^{-pi x}$$ Define $t_i=sin(x_i)$, $u=log(x_i)$, $v=e^{-pi x_i}$. So the model is just
                      $$y=a_0+a_1t+a_2u+a_3v$$ which corresponds to a multilinear regression.






                      share|cite|improve this answer



























                        up vote
                        2
                        down vote













                        A model which is linear with respect to the parameters write
                        $$y=sum_{k=1}^n a_k,f_k(x)$$ and the $f_k(x)$ are the $k$ basis functions.



                        Suppose that you want to fit data to the model
                        $$y=a_0+a_1sin(x)+a_2log(x)+a_3 e^{-pi x}$$ Define $t_i=sin(x_i)$, $u=log(x_i)$, $v=e^{-pi x_i}$. So the model is just
                        $$y=a_0+a_1t+a_2u+a_3v$$ which corresponds to a multilinear regression.






                        share|cite|improve this answer

























                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          A model which is linear with respect to the parameters write
                          $$y=sum_{k=1}^n a_k,f_k(x)$$ and the $f_k(x)$ are the $k$ basis functions.



                          Suppose that you want to fit data to the model
                          $$y=a_0+a_1sin(x)+a_2log(x)+a_3 e^{-pi x}$$ Define $t_i=sin(x_i)$, $u=log(x_i)$, $v=e^{-pi x_i}$. So the model is just
                          $$y=a_0+a_1t+a_2u+a_3v$$ which corresponds to a multilinear regression.






                          share|cite|improve this answer














                          A model which is linear with respect to the parameters write
                          $$y=sum_{k=1}^n a_k,f_k(x)$$ and the $f_k(x)$ are the $k$ basis functions.



                          Suppose that you want to fit data to the model
                          $$y=a_0+a_1sin(x)+a_2log(x)+a_3 e^{-pi x}$$ Define $t_i=sin(x_i)$, $u=log(x_i)$, $v=e^{-pi x_i}$. So the model is just
                          $$y=a_0+a_1t+a_2u+a_3v$$ which corresponds to a multilinear regression.







                          share|cite|improve this answer














                          share|cite|improve this answer



                          share|cite|improve this answer








                          edited 2 days ago

























                          answered 2 days ago









                          Claude Leibovici

                          117k1156131




                          117k1156131






















                              codelearner is a new contributor. Be nice, and check out our Code of Conduct.










                              draft saved

                              draft discarded


















                              codelearner is a new contributor. Be nice, and check out our Code of Conduct.













                              codelearner is a new contributor. Be nice, and check out our Code of Conduct.












                              codelearner is a new contributor. Be nice, and check out our Code of Conduct.
















                              Thanks for contributing an answer to Mathematics 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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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.


                              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%2fmath.stackexchange.com%2fquestions%2f3021311%2fconfused-about-the-terminology-of-least-regression-squares%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

                              Bressuire

                              Cabo Verde

                              Gyllenstierna