*3.3.2 MARS algorithm*

MARS model was first developed by [53]. Its working procedure involved establishing a relationship among a set of input variables and the target-dependent that involve connections with less number of variables [54]. MARS produces flexible models to facilitate the solution space to be divided into several intervals of independent parameters whereas individual splines are fit to each interval [53]. This method is non-parametric and non-linear and it involves a forward-backward procedure to predict a continuous dependent parameter in high-dimensional data [55]. No assumptions have been made about the fundamental functional relationships between independent and dependent variables by the MARS model. In MARS, the splines are connected smoothly together to form piecewise curves which are also known as basis functions (BFs), and these form a flexible model which is capable of handling both linear and non-linear behavior [54]. Two stages are involved in setting up the MARS model which includes forward (constructing the model) and backward (a pruning procedure) stages. In the first stage (forward), to define a pair of BFs candidates, knots are placed within the range of each predictor variable. To produce a maximum reduction in sum-of-squares residual error, the model adjusts the knot and its corresponding pair of BFs in each step. This process of adding BFs lasts and generally a very complex and overfitted model is produced. However, the overfitted model is pruned by deleting the less important redundant BFs in the backward stage [54, 55].

The MARS model *f*(*X*) is generally expressed by the following equation;

$$f(\mathbf{x}) = \delta\_o + \sum\_{m=1}^{M} \delta\_m h\_m(X) \tag{2}$$

Where *δ<sup>o</sup>* and *δ<sup>m</sup>* denote the coefficients which are calculated by the least sum of squared errors from splines functions, whereas *hm*ð Þ *X* represents the spline

*Prediction of Relative Humidity in a High Elevated Basin of Western Karakoram by Using… DOI: http://dx.doi.org/10.5772/intechopen.98226*

functions, and *M* denotes the number of functions. The pruning stage improves the forecasting accuracy of the model and *M* is determined during this phase [55].
