Split into fit_module_sets and fit_iteratively.
fit_module_sets uses the previous behavior with some
unnecessary checks/loops removed.
fit_iteratively has added the outer tolerance loop
and split iters max_iter argument into 'tol_iter'
to control the max number of total loops per tolerance
level and 'fit_iter' to control the max number of
fitter steps between tolerance checks.
Pulled fit_basic's cost_function into a separate
function named 'basic_cost' in the same module
so that fit_module_sets and fit_iteratively can
use it (as well as future analyses).
Created keyword parsers for fit_module_sets and
fit_iteratively so that using fitter_kwargs
is not necessary.
Split into fit_module_sets and fit_iteratively. fit_module_sets uses the previous behavior with some unnecessary checks/loops removed. fit_iteratively has added the outer tolerance loop and split iters max_iter argument into 'tol_iter' to control the max number of total loops per tolerance level and 'fit_iter' to control the max number of fitter steps between tolerance checks.
Pulled fit_basic's cost_function into a separate function named 'basic_cost' in the same module so that fit_module_sets and fit_iteratively can use it (as well as future analyses).
Created keyword parsers for fit_module_sets and fit_iteratively so that using fitter_kwargs is not necessary.