CLsqFit Class
The CLsqFit class performs least squares analysis of sample data. This class uses the linear least squares method to fit up to 100 coefficients for 1 to 10 independent variables. Options include fitting single channel or RGB data, built-in or user-defined basis functions, iterative data rejection, point editing, and forcing coefficients to specified values.
Despite the power and versatility of this class, its user interface is remarkably simple. For example, the AddPt method adds data points to the sample; using various argument lists, the same method is used to specify 1 to 10 values of the independent variables as well as the observed value for either numeric or RGB data.
Using Multiple Independent Variables
Rejecting Outliers from the Fit
Using CLsqFit with Image Pixels
Overview of Least Squares Estimation
Fits a line to 2 tables of numbers (x and y) and returns a new CLsqFit object |
|
Fits a polynomial to 2 tables of numbers (x and y) and returns a new CLsqFit object. |
|
Fits a 2-d polynomial to 3 tables of numbers (x, y, and z) and returns a new CLsqFit object. |
Creates a new instance of the CLsqFit class. |
|
Deletes the instance of the CLsqFit object. |
Sets the number of coefficients and, optionally, the number of independent variables, or "basis dimensions". |
|
Returns the number of coefficients in total or for the specified basis dimension. |
|
Specifies the basis function. The options are an n-dimensional polynomial (the default), an n-dimensional hyperplane or a user provided function. |
|
Returns the basis function that is selected. |
|
Returns the number of independent variables, or "basis dimensions". |
|
Sets the number of data channels to fit. The options are 1 (the default), 3, or 4. |
|
Returns the number of channels being fit. |
Computes the fit. |
|
Returns the status after computing the fit. |
|
Initializes the fit data by deleting all points that have been added. |
|
Enables (the default) or disables iterative data rejection. |
|
Forces a coefficient to a specified value and does not estimate it in the fit. |
|
Restores a forced coefficient to the pool of coefficients being fit. |
|
Returns the state of a coefficient (estimated or forced). |
|
Resets all forced coefficients so they all will be estimated by the fit. |
|
Returns an error message if the fit fails. |
|
Returns the channel number where the fit failed. |
Returns a coefficient value from the fit. |
|
Returns the error in the coefficient value from the fit. |
|
Returns a covariance from the fit covariance matrix. |
|
Returns the standard deviation of the fit. |
|
Evaluates the predicted value of a specified point using the fit results. |
|
Returns the residual for a point used in the fit. |
|
Returns the mean value for the specified basis dimension. |
|
Returns the min and max values of the independent variable(s). |
|
Returns the min and max values of the observations. |
|
Returns the number of points added to the sample. |
|
Returns the number of points used in the fit. |
|
Returns the number of points rejected from the fit when data rejection is enabled. |
|
Returns the number of points that were manually deleted. |
|
Returns the index of a coefficient based on its dimensional index (used only for the default n-dimensional polynomial basis function). |
Adds a point to the fit collection. |
|
Adds a point with a weight to the first collection. |
|
Returns the value(s) of the independent variable(s) for an existing sample point. |
|
Sets the value(s) of the independent variable for an existing sample point. |
|
Returns the observed value of an existing sample point. |
|
Sets the observed value of an existing sample point. |
|
Returns the weight of a sample point |
|
Sets the weight of a sample point. |
|
Returns the status of asample point (used, deleted, or rejected) when data rejection is enabled. |
|
Returns an table containing all the point X (basis) values for one of the basis dimensions. |
|
Returns a table containing all the point Y (observed) values. |
|
Rreturns a table containing all the point weights. |
|
Sets the status of an existing data point to used, rejected, or deleted. |
|
Returns the index of a point based on a match to its values. |
|
Manually deletes a point from the fit. |
|
Undeletes a point that was deleted from the fit. |
Enables (the default) or disables iterative data rejection. |
|
Sets default values for data rejection parameters. |
|
Sets the high sigma value used for Rejecting Outliers having residuals above the fit. |
|
Returns the high sigma value used for Rejecting Outliers having residuals above the fit. |
|
Sets the low sigma value used for Rejecting Outliers having residuals below the fit. |
|
Returns the low sigma value used for Rejecting Outliers having residuals below the fit. |
|
Sets the number of cycles used for Rejecting Outliers from the fit. |
|
Returns the number of cycles used for Rejecting Outliers from the fit. |