Products & Services Solutions Academia Support User Community Company

Learn more about Curve Fitting Toolbox   

Comparing Surface Fits

Introduction

When you have created multiple fits you can compare different fit types and settings side by side in the Surface Fitting Tool. You can view plots simultaneously and you can examine the goodness-of-fit statistics to compare your fits. This section describes how to compare multiple fits.

Displaying Multiple Fits Simultaneously

To compare plots and see multiple fits simultaneously, use the layout controls at the top right of the Surface Fitting Tool. Alternatively, you can click Window on the menu bar to select the number and position of tiles you want to display. The following example shows two fit tabs displayed side by side. You can see three fits in the session listed in the Table of Fits.

You can close fit tab displays (with the Close button, Fit menu, or context menu), but they remain in your session. The Table of Fits displays all your fits (open and closed). Double-click a fit in the Table of Fits to open a fit tab display. To remove a fit, see Deleting a Surface Fit

You can dock and undock individual fits and navigate between them using the standard MATLAB Desktop and Window menus in the Surface Fitting Tool. For more information, see Opening and Arranging Desktop Tools in the MATLAB Desktop Tools and Development Environment documentation.

Displaying Surface, Residual, and Contour Plots

Within each fit tab, you can display up to three plots simultaneously to examine the fit. Use the View menu to select the type of plot to display: surface plot, residuals plot, or contour plot. See also Exploring and Customizing Plots.

Surface Plot

The surface plot displays by default. For polynomial and custom fits, you also can use the Tools menu to display Surface Prediction Bounds. When you display Surface Prediction Bounds, two additional surfaces are plotted to show the prediction bounds on both sides of your model fit.

Choose which bounds to display: None, 90%, 95%, 99%, or Custom. The custom option opens a dialog box where you can enter the required confidence level.

The following example shows prediction bounds. You can see three surfaces on the plot. The top and bottom surfaces show the prediction bounds at the specified confidence level on either side of your model fit surface.

You can also switch your surface plot to a 2-D plot if desired. Your plot cursor must be in rotation mode. Select Tools > Rotate 3D if necessary. Then, right-click the plot to select X-Y, X-Z, or Y-Z view, or to select Rotate Options. All these context menu options are standard MATLAB 3–D plot tools. See Rotate 3D — Interactive Rotation of 3-D Views in the MATLAB Graphics documentation.

Residuals Plot

On the Residuals Plot, you can view the errors between your fitted surface and your data, and you can remove outliers. See Removing Outliers. The following example shows a residuals plot with some excluded outliers.

Contour Plot

Use the contour plot to examine a contour map of your surface. A contour plot makes it easier to see points that have the same height. An example is shown in Displaying Surface, Residual, and Contour Plots.

Using the Statistics in the Table of Fits

The Table of Fits list pane shows all fits in the current session.

After using graphical methods to evaluate the goodness of fit, you can examine the goodness-of-fit statistics shown in the table to compare your fits. The goodness-of-fit statistics help you determine how well the surface fits the data. Click the table column headers to sort by statistics, name, fit type, and so on.

The following guidelines help you use the statistics to determine the best fit:

For a more detailed explanation of the Curve Fitting Toolbox statistics, see Goodness-of-Fit Statistics.

To compare the statistics for different surfaces and decide which fit is the best tradeoff between over- and under-fitting, use a similar process to that described for curve fitting in Determining the Best Fit.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS