Multivariable Polynomial Regression
|
10-13-2014, 10:28 PM
(This post was last modified: 11-10-2014 08:18 PM by Han.)
Post: #2
|
|||
|
|||
RE: Polynomial Regression
Here is a program that is best used in conjunction with the Stat2Var app. Eventually this will evolve into a full-blown app that will enable users to create 3D surface regressions (using polynomials of a degree specified by the user).
Usage as follows: \[ \mathrm{multireg}(\text{list_of_data},\text{degree}) \rightarrow \left\{ a_0, a_1, \dotsm, a_{k(d)-1} \right\} \] where \( k(d) = (d+1)(d+2)/2 \) and the 2-variable polynomial is of the form \[ f(x,y) = a_0 + a_1 x + a_2 y + a_3 x^2 + a_4 xy + a_5 y^2 + \dotsm + a_{k(d)-2} xy^{d-1} + a_{k(d)-1} y^d \] and the list_of_data parameter is a list of three lists (for the \( x_i \), \(y_i\), and \( z_i \) values). Typically the data would be pulled from C0 through C9 in the Stat2Var app. So list_of_data may be something like: { C1, C2, C3 }. The algorithm is essentially the same as that for 1-variable polynomial regression. Both cases use an appropriate Vandermonde matrix to solve for the critical point in the least sum-of-squared-residuals equation. (Please note that error checking for valid input data is very minimal.) Code: mrerr:={ 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)