# Moving Least Squares Method (MLSM)

Builds a weighted least squares model where the weights associated with the sampling points do not remain constant.

Weights are functions of the normalized distance from a sampling point to a point x, where the surrogate model is evaluated. The weight, associated to a sampling point, decays as the evaluation point moves away from it. The decay is defined through a decay function. For each point x it reconstructs a continuous function biased towards the region around that point.

## Usability Characteristics

• Suggested to be used for nonlinear and noisy output responses.
• Residuals and diagnostics should be used to gain an understanding of the quality of the Fit.
• Use a Testing matrix in addition to an Input matrix for better diagnostics.
• Quality of a Moving Least Squares Method Fit is a function of the number of runs, order of the polynomial and the behavior of the application.
• If the residuals and diagnostics are not good for a Moving Least Squares Method Fit, than you can increase the order of the Fit provided you have enough runs to fit that specific order.
• Because the weights are not constant in Moving Least Squares Method, there is no analytical form and an equation can not be provided.

## Settings

In the Specifications step, Settings tab, change method settings.
Note: For most applications the default settings work optimally, and you may only need to change the Order to improve the Fit quality.
Parameter Default Range Description
Fit Parameter 5.0
• >= 0.0
• <= 10.0
Controls the effect of screening out noise; the larger value, the less effect.
Minimum Weight 0.001 > 0.0 Minimum weight.
Number of Excess Points 3 >=0 Number of excessive points to build Moving Least Squares Method.
Regression Model Linear
• Linear
• Squared
• Cubic
• Interaction
• Full Cubic
• Custom
Order of polynomial function.
Weighting Function Gaussian
• Gaussian (Recommended)
• Cubic
• Fourth Order
• Fifth Order
• Seventh Order
Type of weighting function.
Gaussian
${W}_{i}=\mathrm{exp}\left(-\theta {r}_{i}{}^{2}\right)$
where ${r}_{i}$ is the normalized distance from the i-th sampling point to a current point. The parameter $\theta$ defines the closeness of fit, the case $\theta$ =0 is equivalent to the traditional Least Squares Regression. When the parameter $\theta$ is large, it is possible to obtain a very close fit through the sampling points, if desired. The images in Figure 1 illustrate the change of the weight over the interval [0,1] where the sampling point is at r = 0.
Cubic
${w}_{i}=1-3{p}_{i}{}^{2}+2{p}_{i}{}^{3}$
where ${p}_{i}={r}_{i}/{R}_{\mathrm{max}},{R}_{\mathrm{max}}$ is the normalized radius of the sphere of influence.
The normalized radius of the sphere of influence ${R}_{\mathrm{max}}$ inversely relates to the closeness of fit parameter, for example the smaller the value of ${R}_{\mathrm{max}}$ , the closer fit is obtained.
Fourth Order
${w}_{i}=1-6{p}_{i}{}^{2}+8{p}_{i}{}^{3}+3{p}_{i}{}^{4}$
Fifth Order
${w}_{i}=1-10{p}_{i}{}^{3}+15{p}_{i}{}^{4}+6{p}_{i}{}^{5}$
Seventh Order
${w}_{i}=1-35{p}_{i}{}^{4}+84{p}_{i}{}^{5}+70{p}_{i}{}^{6}+20{p}_{i}{}^{7}$