Bivariate Polynomial Regression
This application:
•
|
Allows arbitrary 3-D data to be specified (for example, a table of X, Y, Z points).
|
•
|
Generates a bivariate polynomial with a customizable order.
|
•
|
Fits the polynomial to the data with a least-squares fit.
|
•
|
Plots the data against the best-fit polynomial surface.
|
|
Specify the Data Set
|
|
Below we include some sample point data in a DataTable component and associate it with the variable .
Alternatively, this data could be imported from an external source using the Import command.
|
|
Define Model Equation
|
|
The general form of a bivariate polynomial of total degree is given by:
| (2.1) |
For example, the general form for a bivariate quadratic is:
| (2.2) |
Next, we choose the order of the bivariate polynomial which we will fit to the points. Increasing this value will refine the fit.
| (2.4) |
|
|
Calculate Parameters by Least Squares Minimization
|
|
Separate and normalize the data
Define objective function:
Minimize the objective function:
| (3.2) |
Assign the values corresponding to the minimum value to the parameters:
|
|
Plot Original Data against Best Fit Surface
|
|
Original Data:
Best Fit Surface:
|
|