Regression with a Vandermonde matrix.
$begingroup$
From what I understand, when doing a least squares regression with a Vandermonde matrix, you're essentially solving the equation
$y=Xa$
Where y is a vector of y-values, X is the Vandermonde matrix, and a is a vector of coefficients.
When you solve this equation for a,
$a=(X^TX)^{-1}X^Ty$
You get the above expression for a.
My understanding is that this should be a solution to the set of equations. However, it is possible to fit n points of data to a k-th degree polynomial, where n>k. This would imply that there are more equations than unknowns, which results in no possible solutions. However, the vector a can be calculated. This resulting vector does not completely perfectly satisfy
$y=Xa$
But instead is a good approximation, as with regression.
Why can we get a value for a? As I do not believe this could be possible if we were dealing with n equations, and k unknowns. Where does the matrix solution differ from solving k unknowns with n equations?
matrices
$endgroup$
add a comment |
$begingroup$
From what I understand, when doing a least squares regression with a Vandermonde matrix, you're essentially solving the equation
$y=Xa$
Where y is a vector of y-values, X is the Vandermonde matrix, and a is a vector of coefficients.
When you solve this equation for a,
$a=(X^TX)^{-1}X^Ty$
You get the above expression for a.
My understanding is that this should be a solution to the set of equations. However, it is possible to fit n points of data to a k-th degree polynomial, where n>k. This would imply that there are more equations than unknowns, which results in no possible solutions. However, the vector a can be calculated. This resulting vector does not completely perfectly satisfy
$y=Xa$
But instead is a good approximation, as with regression.
Why can we get a value for a? As I do not believe this could be possible if we were dealing with n equations, and k unknowns. Where does the matrix solution differ from solving k unknowns with n equations?
matrices
$endgroup$
add a comment |
$begingroup$
From what I understand, when doing a least squares regression with a Vandermonde matrix, you're essentially solving the equation
$y=Xa$
Where y is a vector of y-values, X is the Vandermonde matrix, and a is a vector of coefficients.
When you solve this equation for a,
$a=(X^TX)^{-1}X^Ty$
You get the above expression for a.
My understanding is that this should be a solution to the set of equations. However, it is possible to fit n points of data to a k-th degree polynomial, where n>k. This would imply that there are more equations than unknowns, which results in no possible solutions. However, the vector a can be calculated. This resulting vector does not completely perfectly satisfy
$y=Xa$
But instead is a good approximation, as with regression.
Why can we get a value for a? As I do not believe this could be possible if we were dealing with n equations, and k unknowns. Where does the matrix solution differ from solving k unknowns with n equations?
matrices
$endgroup$
From what I understand, when doing a least squares regression with a Vandermonde matrix, you're essentially solving the equation
$y=Xa$
Where y is a vector of y-values, X is the Vandermonde matrix, and a is a vector of coefficients.
When you solve this equation for a,
$a=(X^TX)^{-1}X^Ty$
You get the above expression for a.
My understanding is that this should be a solution to the set of equations. However, it is possible to fit n points of data to a k-th degree polynomial, where n>k. This would imply that there are more equations than unknowns, which results in no possible solutions. However, the vector a can be calculated. This resulting vector does not completely perfectly satisfy
$y=Xa$
But instead is a good approximation, as with regression.
Why can we get a value for a? As I do not believe this could be possible if we were dealing with n equations, and k unknowns. Where does the matrix solution differ from solving k unknowns with n equations?
matrices
matrices
edited Sep 2 '13 at 5:00
Potato
21.6k1189190
21.6k1189190
asked Sep 2 '13 at 4:52
user2738622user2738622
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
First, a little explanation of what is happening when you solve for $a$ in
$vec{a}=(X^TX)^{-1}X^Tvec{y}$ .
The $(X^TX)^{-1}X^T$ part is the Moore-Penrose pseudoinverse. It uses $X$'s Gramian matrix (the $X^TX$), which is a square positive semidefinite matrix yielding the same eigenvectors as $X$ while squaring its eigenvalues. Taking the inverse of this Gramian matrix and multiplying it by $X^T$ actually performs a least square fit (see this and this reference). It is a property of the pseudoinverse.
As for your question about dealing with $n$ equations and $k$ unknowns, there are two possible cases (I suppose the rank of your matrix is at least equal to $k$):
- The number of (linearly independent) equations is greater than the number of unknowns ( $n > k$, matrix is overdetermined). In this case, either a single exact solution or none exist. The least squares regression is commonly used in this case. It will give the coefficients $vec{a}$ that minimizes the euclidean norm of the errors: $min epsilon : left( hat{y} = Xvec{a} + epsilon right) $.
- The number of (linearly independent) equations is equal or less than the number of unknowns ( $n le k$, matrix is full rank or underdetermined). In this case, either a single exact solution (when full rank) or many (up to an infinity) of them exist (when full rank or underdetermined). The pseudoinverse will construct the solution that minimizes the euclidean norm among all solutions in the matrix the nullspace: $min hat{a} : left( hat{y} = Xvec{a} right) $.
$endgroup$
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f481845%2fregression-with-a-vandermonde-matrix%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
$begingroup$
First, a little explanation of what is happening when you solve for $a$ in
$vec{a}=(X^TX)^{-1}X^Tvec{y}$ .
The $(X^TX)^{-1}X^T$ part is the Moore-Penrose pseudoinverse. It uses $X$'s Gramian matrix (the $X^TX$), which is a square positive semidefinite matrix yielding the same eigenvectors as $X$ while squaring its eigenvalues. Taking the inverse of this Gramian matrix and multiplying it by $X^T$ actually performs a least square fit (see this and this reference). It is a property of the pseudoinverse.
As for your question about dealing with $n$ equations and $k$ unknowns, there are two possible cases (I suppose the rank of your matrix is at least equal to $k$):
- The number of (linearly independent) equations is greater than the number of unknowns ( $n > k$, matrix is overdetermined). In this case, either a single exact solution or none exist. The least squares regression is commonly used in this case. It will give the coefficients $vec{a}$ that minimizes the euclidean norm of the errors: $min epsilon : left( hat{y} = Xvec{a} + epsilon right) $.
- The number of (linearly independent) equations is equal or less than the number of unknowns ( $n le k$, matrix is full rank or underdetermined). In this case, either a single exact solution (when full rank) or many (up to an infinity) of them exist (when full rank or underdetermined). The pseudoinverse will construct the solution that minimizes the euclidean norm among all solutions in the matrix the nullspace: $min hat{a} : left( hat{y} = Xvec{a} right) $.
$endgroup$
add a comment |
$begingroup$
First, a little explanation of what is happening when you solve for $a$ in
$vec{a}=(X^TX)^{-1}X^Tvec{y}$ .
The $(X^TX)^{-1}X^T$ part is the Moore-Penrose pseudoinverse. It uses $X$'s Gramian matrix (the $X^TX$), which is a square positive semidefinite matrix yielding the same eigenvectors as $X$ while squaring its eigenvalues. Taking the inverse of this Gramian matrix and multiplying it by $X^T$ actually performs a least square fit (see this and this reference). It is a property of the pseudoinverse.
As for your question about dealing with $n$ equations and $k$ unknowns, there are two possible cases (I suppose the rank of your matrix is at least equal to $k$):
- The number of (linearly independent) equations is greater than the number of unknowns ( $n > k$, matrix is overdetermined). In this case, either a single exact solution or none exist. The least squares regression is commonly used in this case. It will give the coefficients $vec{a}$ that minimizes the euclidean norm of the errors: $min epsilon : left( hat{y} = Xvec{a} + epsilon right) $.
- The number of (linearly independent) equations is equal or less than the number of unknowns ( $n le k$, matrix is full rank or underdetermined). In this case, either a single exact solution (when full rank) or many (up to an infinity) of them exist (when full rank or underdetermined). The pseudoinverse will construct the solution that minimizes the euclidean norm among all solutions in the matrix the nullspace: $min hat{a} : left( hat{y} = Xvec{a} right) $.
$endgroup$
add a comment |
$begingroup$
First, a little explanation of what is happening when you solve for $a$ in
$vec{a}=(X^TX)^{-1}X^Tvec{y}$ .
The $(X^TX)^{-1}X^T$ part is the Moore-Penrose pseudoinverse. It uses $X$'s Gramian matrix (the $X^TX$), which is a square positive semidefinite matrix yielding the same eigenvectors as $X$ while squaring its eigenvalues. Taking the inverse of this Gramian matrix and multiplying it by $X^T$ actually performs a least square fit (see this and this reference). It is a property of the pseudoinverse.
As for your question about dealing with $n$ equations and $k$ unknowns, there are two possible cases (I suppose the rank of your matrix is at least equal to $k$):
- The number of (linearly independent) equations is greater than the number of unknowns ( $n > k$, matrix is overdetermined). In this case, either a single exact solution or none exist. The least squares regression is commonly used in this case. It will give the coefficients $vec{a}$ that minimizes the euclidean norm of the errors: $min epsilon : left( hat{y} = Xvec{a} + epsilon right) $.
- The number of (linearly independent) equations is equal or less than the number of unknowns ( $n le k$, matrix is full rank or underdetermined). In this case, either a single exact solution (when full rank) or many (up to an infinity) of them exist (when full rank or underdetermined). The pseudoinverse will construct the solution that minimizes the euclidean norm among all solutions in the matrix the nullspace: $min hat{a} : left( hat{y} = Xvec{a} right) $.
$endgroup$
First, a little explanation of what is happening when you solve for $a$ in
$vec{a}=(X^TX)^{-1}X^Tvec{y}$ .
The $(X^TX)^{-1}X^T$ part is the Moore-Penrose pseudoinverse. It uses $X$'s Gramian matrix (the $X^TX$), which is a square positive semidefinite matrix yielding the same eigenvectors as $X$ while squaring its eigenvalues. Taking the inverse of this Gramian matrix and multiplying it by $X^T$ actually performs a least square fit (see this and this reference). It is a property of the pseudoinverse.
As for your question about dealing with $n$ equations and $k$ unknowns, there are two possible cases (I suppose the rank of your matrix is at least equal to $k$):
- The number of (linearly independent) equations is greater than the number of unknowns ( $n > k$, matrix is overdetermined). In this case, either a single exact solution or none exist. The least squares regression is commonly used in this case. It will give the coefficients $vec{a}$ that minimizes the euclidean norm of the errors: $min epsilon : left( hat{y} = Xvec{a} + epsilon right) $.
- The number of (linearly independent) equations is equal or less than the number of unknowns ( $n le k$, matrix is full rank or underdetermined). In this case, either a single exact solution (when full rank) or many (up to an infinity) of them exist (when full rank or underdetermined). The pseudoinverse will construct the solution that minimizes the euclidean norm among all solutions in the matrix the nullspace: $min hat{a} : left( hat{y} = Xvec{a} right) $.
answered Jul 22 '15 at 7:08
SoravuxSoravux
1363
1363
add a comment |
add a comment |
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.
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%2f481845%2fregression-with-a-vandermonde-matrix%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