Method summary
- __init__(self, data, model, beta0 = None, delta0 = None, ifixb = None, ifixx = None, job = None, iprint = None, errfile = None, rptfile = None, ndigit = None, taufac = None, sstol = None, partol = None, maxit = None, stpb = None, stpd = None, sclb = None, scld = None, work = None, iwork = None)
- restart(self, iter = None)
- run(self)
- set_iprint(self, init = None, so_init = None, iter = None, so_iter = None, iter_step = None, final = None, so_final = None)
- set_job(self, fit_type = None, deriv = None, var_calc = None, del_init = None, restart = None)
Methods
- __init__(self, data, model, beta0 = None, delta0 = None, ifixb = None, ifixx = None, job = None, iprint = None, errfile = None, rptfile = None, ndigit = None, taufac = None, sstol = None, partol = None, maxit = None, stpb = None, stpd = None, sclb = None, scld = None, work = None, iwork = None)
- restart(self, iter = None)
Restarts the run with iter more iterations.
Parameters
- iter : int, optional
- ODRPACK's default for the number of new iterations is 10.
Returns
- output : Output instance
- This object is also assigned to the attribute .output .
- run(self)
Run the fitting routine with all of the information given.
Returns
- output : Output instance
- This object is also assigned to the attribute .output .
- set_iprint(self, init = None, so_init = None, iter = None, so_iter = None, iter_step = None, final = None, so_final = None)
Set the iprint parameter for the printing of computation reports.
If any of the arguments are specified here, then they are set in the iprint member. If iprint is not set manually or with this method, then ODRPACK defaults to no printing. If no filename is specified with the member rptfile, then ODRPACK prints to stdout. One can tell ODRPACK to print to stdout in addition to the specified filename by setting the so_* arguments to this function, but one cannot specify to print to stdout but not a file since one can do that by not specifying a rptfile filename.
There are three reports: initialization, iteration, and final reports. They are represented by the arguments init, iter, and final respectively. The permissible values are 0, 1, and 2 representing "no report", "short report", and "long report" respectively.
The argument iter_step (0 <= iter_step <= 9) specifies how often to make the iteration report; the report will be made for every iter_step'th iteration starting with iteration one. If iter_step == 0, then no iteration report is made, regardless of the other arguments.
If the rptfile is None, then any so_* arguments supplied will raise an exception.
- set_job(self, fit_type = None, deriv = None, var_calc = None, del_init = None, restart = None)
Sets the "job" parameter is a hopefully comprehensible way. If an argument is not specified, then the value is left as is. The default value from class initialization is for all of these options set to 0. _______________________________________________________________________ Parameter Value Meaning --------- ----- ------- fit_type 0 explicit ODR 1 implicit ODR 2 ordinary least-squares deriv 0 forward finite differences 1 central finite differences 2 user-supplied derivatives (Jacobians) with results checked by ODRPACK 3 user-supplied derivatives, no checking var_calc 0 calculate asymptotic covariance matrix and fit parameter uncertainties (V_B, s_B) using derivatives recomputed at the final solution 1 calculate V_B and s_B using derivatives from last iteration 2 do not calculate V_B and s_B del_init 0 initial input variable offsets set to 0 1 initial offsets provided by user in variable "work" restart 0 fit is not a restart 1 fit is a restart _______________________________________________________________________ The permissible values are different from those given on pg. 31 of the ODRPACK User's Guide only in that one cannot specify numbers greater than the last value for each variable. If one does not supply functions to compute the Jacobians, the fitting procedure will change deriv to 0, finite differences, as a default. To initialize the input variable offsets by yourself, set del_init to 1 and put the offsets into the "work" variable correctly.
