Confused about the terminology of least regression squares
up vote
2
down vote
favorite
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
New contributor
add a comment |
up vote
2
down vote
favorite
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
New contributor
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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
New contributor
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
calculus linear-algebra matlab least-squares
New contributor
New contributor
edited Dec 1 at 13:06
Rócherz
2,6962721
2,6962721
New contributor
asked Dec 1 at 12:57
codelearner
132
132
New contributor
New contributor
add a comment |
add a comment |
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
add a comment |
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.
add a comment |
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
add a comment |
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
add a comment |
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
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
answered 2 days ago
Yves Daoust
122k668218
122k668218
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited 2 days ago
answered 2 days ago
Claude Leibovici
117k1156131
117k1156131
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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