Optimum Estimate of Function Parameters by Iterated Linearization (OEFPIL)
Algorithm for nonlinear function fitting to data with errors in variables where correlation, both within variables and among variables, might be present. In principle, OEFPIL can be employed for fitting both explicit and implicit functions of any number of variables. Importantly, apart from the parameter estimates, OEFPIL also yields their covariance matrix, required for further analyses.1 Common methods such as ordinary nonlinear least squares are not capable of treating general uncertainties and correlations in both dependent and independent variables. A new computation method for nonlinear curve fitting to data with a general covariance structure is introduced. Numerical simulations show that the new method yields parameter estimates in agreement with other methods for simple covariance structures. The obtained uncertainty estimates are in agreement with Monte Carlo studies.2
The most notable features of OEFPIL are as follows:2
- The OEFPIL algorithm features an improved estimation of uncertainties and covariance matrices of the fitted parameters which can be further propagated to physical output variables.
- More general covariance matrices for input data can be applied, although so far they do not seem to lead to significant shifts in the physical output variables. However, estimates of uncertainties of these are obviously affected.
- Unlike ordinary least squares OEFPIL is not sensitive to the choice of dependent and independent variables.
- Unlike non-linear least squares and orthogonal distance regression, a reasonable uncertainty estimate can be deduced directly without resorting to Monte Carlo studies, evading thus long computation times.
- A possible disadvantage of OEFPIL is a higher sensitivity to initial estimates of parameters and the covariance matrix of the input data. However, so far problems have been encountered only for exaggerated estimates of the input covariance matrix.
Regarding the second feature above, ignoring the correlation shifts the estimates of the examples
supernovae.rs and rar.rs by about one standard
deviation.
This crate is a pure Rust implementation of the C/Fortran library without any system dependency.
It works in no_std environments with an allocator. Its results agree with the
C/Fortran library, which the test suite compares against via the oefpil-sys crate. The
exception is the additional covariance matrix mode Covariance::new_grouped(), which has no
counterpart there and is compared against Covariance::new_full() instead.
See the release history to keep track of the development.
This work is dual-licensed under either MIT or Apache-2.0 at your option. This means you can
select the license you prefer. This dual-licensing approach is the de-facto standard in the Rust
ecosystem. Copyrights in this work are retained by their contributors and no copyright assignment is
required to contribute to this work. For full authorship information, see the individual files and
the version control history.
The algorithm in src/oefpil.rs and src/tiled.rs is derived from the
C/Fortran library, which is licensed under MIT with copyright notice:
Copyright © 2020 Czech Metrology Institute
The works in oefpil-sys carry their own copyright notices and license terms.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the
work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any
additional terms or conditions.
Footnotes
-
R. Šlesinger, A. C. Campbell, Z. Geršlová, V. Šindlář, and G. Wimmer, “OEFPIL: New Method and Software Tool for Fitting Nonlinear Functions to Correlated Data With Errors in Variables”, 2023 14th International Conference on Measurement, 126-129 (2023). ↩
-
A. C. Campbell, Z. Geršlová, V. Šindlář, R. Šlesinger, and G. Wimmer, “New framework for nanoindentation curve fitting and measurement uncertainty estimation”, Precision Engineering 85, 166-173 (2024). ↩ ↩2