Lowess (locally weighted scatterplot smoothing) is used for plotting a smoothed curve or surface and has been an available option for both ScatterPlot and ScatterPlot3D for several releases. In Maple 2015, the new Lowess command returns the function whose graph is the lowess smoothed curve or surface. Returning a function rather than a plot also means that the Lowess command is capable of handling data points in any finite dimension. The lowess algorithm has also been improved to produce better plots and to achieve lower computation times in routines like ScatterPlot and ScatterPlot3D.
Following is an example of the use of Lowess together with ScatterPlot3D. First, generate 300 data points and store them in a 300x3 Matrix, .
Now, compute the lowess model, , and plot .
Finally, plot the data points by themselves, and display the two plots together.
The lowess model can also be used in most other contexts where you can use a procedure. For example, you can numerically integrate the volume between the lowess surface and the plane (this turns out to be negative - there is more volume below zero than above):
In the following example, the data points are two-dimensional (there is one independent and one dependent variable).
If these data points represent the response to a certain stimulus, you can expect the highest response where the model assumes the highest value. You can find this point with the Maximize command from the Optimization package.
The maximum, of about 0.012, is assumed when the stimulus is approximately 20. (The number varies a little bit depending on the random samples chosen previously.)