Within the NAG® Library Optimization Modelling Suite is a solver for the analysis of data using nonlinear regression and data fitting. It encapsulates a selection of calibration models (the loss function and regularization types) making it a great starting point for the journey of exploring the nonlinear nature of your experimental data.

Nonlinear data fitting (calibration) concerns finding optimal model parameters so the model follows the observed data. Widely used methods, such as ordinary least squares, don’t always capture the underlying data distribution; the NAG® Library solver also supports robust regression methods, particularly useful in the presence of outliers in the data. The solver offers a great variety of the models, such as Least Absolute Value and Cauchy, possibly extended with \( 1_{1} \) norm or \( 1_{2} \) norm regularization. In addition, the models can include general constraints such as bound, linear, quadratic, and nonlinear constraints. The switching between different types of models and regularizations is very easy.



Data fitting/calibration is widespread. Commonly used in by those needing to fit a mathematical model to an experimental data set. Application use is found, but not limited to, econometrics and finance, image processing, civil engineering, mechanical engineering, and astronomy. Typically, the least squares (LSQ) method is the one used most frequently assuming the measurement errors follow the Normal distribution model. When the assumptions are unrealistic or the data set contains various level of outliers, the need for robustness appears. The NAG® Library solver handle_​solve_​nldf (e04gn) allows easy model modification to adapt the method to the data set.


Customisable and Extendable

The NAG® Library solver handle_​solve_​nldf (e04gn) is highly modular in terms of models implemented; customizable and extendable to meet specific user needs today and in the future.


The image shows the impact of various calibration models fitting the data represented by blue dots. It is clear the fit by the Cauchy model (violet) is more appropriate for the data set used.