When fitting a polynomial to data points, how to determine the reasonable degree to use?Linear regression for minimizing the maximum of the residualsFitting for piecewise function, with constraints on first/second derivativeIntuitive proof of interpolation polynomial existenceFor a fixed degree, is there always a Lagrange polynomial below the original function?Optimal place to measure for simple linear regression/fittingInterpolation of Symmetric DataProving that $R^2to 1$ as the degree of a polynomial $kto infty$ for a least squares regression.Is it Possible to Linearise the Bounded Growth Model to use LLSQ?Why isn't the linear regression coefficient not just the average vector to data points?How to feed data into a polynomial basis function regression (unregularized) for degree n?
Smoothness of finite-dimensional functional calculus
What do you call a Matrix-like slowdown and camera movement effect?
What is the offset in a seaplane's hull?
What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)
If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?
How old can references or sources in a thesis be?
What are these boxed doors outside store fronts in New York?
What would happen to a modern skyscraper if it rains micro blackholes?
Theorems that impeded progress
Are the number of citations and number of published articles the most important criteria for a tenure promotion?
What does it mean to describe someone as a butt steak?
How much RAM could one put in a typical 80386 setup?
How to test if a transaction is standard without spending real money?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Service Entrance Breakers Rain Shield
Why are electrically insulating heatsinks so rare? Is it just cost?
Prove that NP is closed under karp reduction?
Languages that we cannot (dis)prove to be Context-Free
Today is the Center
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
Test whether all array elements are factors of a number
can i play a electric guitar through a bass amp?
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
When fitting a polynomial to data points, how to determine the reasonable degree to use?
Linear regression for minimizing the maximum of the residualsFitting for piecewise function, with constraints on first/second derivativeIntuitive proof of interpolation polynomial existenceFor a fixed degree, is there always a Lagrange polynomial below the original function?Optimal place to measure for simple linear regression/fittingInterpolation of Symmetric DataProving that $R^2to 1$ as the degree of a polynomial $kto infty$ for a least squares regression.Is it Possible to Linearise the Bounded Growth Model to use LLSQ?Why isn't the linear regression coefficient not just the average vector to data points?How to feed data into a polynomial basis function regression (unregularized) for degree n?
$begingroup$
I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.
regression interpolation mathematical-modeling
$endgroup$
add a comment |
$begingroup$
I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.
regression interpolation mathematical-modeling
$endgroup$
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16
add a comment |
$begingroup$
I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.
regression interpolation mathematical-modeling
$endgroup$
I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.
regression interpolation mathematical-modeling
regression interpolation mathematical-modeling
edited Oct 28 '15 at 21:25
user147263
asked Oct 28 '15 at 20:04
studentstudent
1
1
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16
add a comment |
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.
For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.
It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.
Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.
Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.
If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.
Best of luck!
$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%2f1502316%2fwhen-fitting-a-polynomial-to-data-points-how-to-determine-the-reasonable-degree%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$
Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.
For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.
It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.
Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.
Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.
If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.
Best of luck!
$endgroup$
add a comment |
$begingroup$
Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.
For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.
It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.
Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.
Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.
If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.
Best of luck!
$endgroup$
add a comment |
$begingroup$
Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.
For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.
It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.
Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.
Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.
If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.
Best of luck!
$endgroup$
Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.
For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.
It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.
Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.
Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.
If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.
Best of luck!
answered Oct 28 '15 at 20:51
RonothRonoth
935
935
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%2f1502316%2fwhen-fitting-a-polynomial-to-data-points-how-to-determine-the-reasonable-degree%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
$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16