Improved data fitting in 2.5

Continuing the introduction of the new features coming soon with the next release of LabPlot (see the previous blogs here and here), we want to share today some news about the developments we did for the data fitting (linear and non-linear regression analysis) in the last couple of months.

Data fitting, one of the most common and frequently used data analysis tasks, got a lot of improvements. As already mentioned in the previous blog, all analysis functions benefited from the recent general UX improvements. Instead of going through the many manual steps, the final fit result can now be quickly produced via the context menu of the data spreadsheet or directly in the plot in the context menu of the data curve:

analyze and plot data context menu

Until now, the fit parameters could in principle take any values allowed by the fit model, which would lead to a reasonable description of the data. However, sometimes the realistic regions for the parameters are known in advance and it is desirable to set some mathematical constrains on them. LabPlot provides now the possibility to define lower and/or upper bounds for the fit parameters and to limit the internal fit algorithm to these regions only. Also, it is possible now to fix parameters to certain already known values:

New fit parameters widget

Some consistency checks were implemented to notify the user about wrong inputs (upper bound is smaller than the lower bound, start value is outside of the bounds, etc.) immediately.

The internal parser for the mathematical expressions learnt to recognize arbitrary user-defined parameters. With this, the fit parameters of custom models are automatically determined and there is no need for the user anymore to explicitly specify the parameter names manually once more when providing the start values and the constraints for them.

To obtain the improved parameter estimators for data where the error in the measurements is not constant across the different data points, fitting with weights is used usually as one of the methods to account for such unequal distributions of errors. Fitting with weights is supported in LabPlot now. Different weighting methods are available to ensure the appropriate level of influence of the different errors on the final estimation of the fit parameters. Furthermore, the errors for both, the x- and y-data points, can be accounted for.

The representation of the fit results was extended. In addition to what was already available in the previous release of LabPlot for the goodness of the fit, new criteria were added like t and p values, the probability that the null hypothesis in the t-test is true, confidence intervals, Akaike- and Bayesian information criteria. The screenshot below shows the current version of the fit dock widget:

New fit dock widget

Though quite a lot of features are already available in LabPlot in this area, many important and useful features like the support for different fitting algorithms, the subtractions of baseline from a spectrum, etc. need to be implemented. We hope to close the open gaps here very soon in one of the next releases.

3 thoughts to “Improved data fitting in 2.5”

  1. Since the demise of QtiPlot as a free OS project, I’m following LabPlot development with great interest because I do a lot of data fitting to my own equations (biophysical data). So, any likely release date for v2.5? I mean, roughly: one month from now, four months…
    On the other hand, how is the collaboration with SciDavis going? Is it still alive?

    Thanks for your attention and, above all, for making LabPlot possible.

    1. sorry for the late reply. I somehow missed your comment. We planned to release 2.5 last December but had to postpone it because of another important feature that needs more time. A blog post on this will come soon. We’ll need one month or so to stabilize everything. So, somewhere in April the next release is to be expected. In the meantime you can try the current version by compiling from the source code if it’s feasible for you. Every feedback and bug reports are welcome and we still have some time to react on them.

      There is no collaboration with SciDavis anymore. The two SciDavis developers quitted the collaboration already long time ago. The persons who took over the project on sourceforge couple of years later were not really interested in any kind of collaboration. I’m not sure SciDavis is still alive….

Leave a Reply

Your email address will not be published. Required fields are marked *