Multivariable Polynomial Regression
|
10-09-2014, 08:27 PM
(This post was last modified: 03-10-2017 09:22 PM by Han.)
Post: #1
|
|||
|
|||
Multivariable Polynomial Regression
Please see the second post and onward. This program below is obsoleted by the polynomial_regression() command. However, if you wish to do 3D surface regression, the program in post #2 and onward are relevant to you.
Edit #1: apparently there is also the built-in command: polynomial_regression() which I just now noticed Edit #2: for a polynomial regression in 3D, see the second post in this thread Here is a program that will create a polynomial regression based on an input matrix m (of dimension 2xn, for n data points) and d, the degree of the polynomial. The result is a list containing
\[ \mathrm{polyfit}\left(\left[ \begin{array}{cccc} x_1 & x_2 & \dotsm & x_n \\ y_1 & y_2 & \dotsm & y_n \end{array} \right], d\right) \rightarrow \left\{ \left[ \begin{array}{c} a_0 \\ a_1 \\ \vdots \\ a_d \end{array} \right] , \text{``}a_0*X^0 + a_1*X^1 + a_2*X^2 + \dotsm + a_d*X^d\text{''}\right\} \] If you have data from the the Stat2Var app, you can easily create the data matrix via: Code: L1:=concat(C1,C2); To use the string representation of the polynomial, simply type in the Home screen: Code: mylist:=polyfit(M1,d); Below is the short source code for polynomial fit: PHP Code: pferror:={"polyfit(m,d): Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Multivariable Polynomial Regression - Han - 10-09-2014 08:27 PM
RE: Polynomial Regression - Han - 10-13-2014, 10:28 PM
RE: Polynomial Regression - Han - 11-07-2014, 09:43 PM
|
User(s) browsing this thread: 1 Guest(s)