fitbenchmarking.parsing.cutest_parser module
This file calls the pycutest interface for SIF data
- class fitbenchmarking.parsing.cutest_parser.CutestParser(filename, options)
Bases:
fitbenchmarking.parsing.base_parser.Parser
Use the pycutest interface to parse SIF files
This parser has some quirks. Due to the complex nature of SIF files, we utilise pycutest to generate the function. This function returns the residual r(f,x,y,e) := (f(x) - y)/e for some parameters x. For consistency we require the value to be f(x, p).
To avoid having to convert back from the residual in the evaluation, we store the data separately and set y to 0.0, and e to 1.0 for all datapoints.
We then accomodate for the missing x argument by caching x against an associated function f_x(p).
As such the function is defined by: f(x, p) := r(f_x,p,0,1)
If a new x is passed, we write a new file and parse it to generate a function. We define x to be new if
not np.isclose(x, cached_x)
for eachcached_x
that has already been stored.- parse()
Get data into a Fitting Problem via cutest.
- Returns
The fully parsed fitting problem
- Return type