scitbx.lstbx

API documentation

class scitbx.lstbx.normal_eqns.non_linear_ls_mixin

Synopsis:

Either of

class non_linear_ls_xxx(core_non_linear_ls_xxx,

non_linear_ls_mixin):

pass

class non_linear_ls_xxx(non_linear_ls_mixin):

# define required methods

This class is a mixin to be inherited as shown. It requires core_non_linear_ls_xxx to provide some methods in the first case, or those methods to be defined directly in the heir in the second case: those that this mixin marks as not-implemented.

build_up(objective_only=False)
normal_matrix_packed_u()
objective()
opposite_of_gradient()
parameter_vector_norm()
solve()
solve_and_step_forward()
step()
step_equations()
step_forward()
scitbx.lstbx.normal_eqns.non_linear_ls_with_separable_scale_factor

alias of non_linear_ls_with_separable_scale_factor_BLAS_2

class scitbx.lstbx.normal_eqns.non_linear_ls_with_separable_scale_factor_BLAS_2
property debug_info
property description

Tools to solve non-linear L.S. problems formulated with normal-equations.

class scitbx.lstbx.normal_eqns_solving.iterations(non_linear_ls, **kwds)

Iterations to solve a non-linear L.S. minimisation problem.

It is assumed that the objective function is properly scaled to be between 0 and 1 (or approximately so), so that this class can meaningfully thresholds the norm of the gradients to watch for convergence.

The interface expected from the normal equations object passed to __init__ is that of lstbx.non_linear_normal_equations_mixin

Use classic stopping criteria: c.f. e.g. Methods for non-linear least-squares problems, K. Madsen, H.B. Nielsen, O. Tingleff, http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3215/pdf/imm3215.pdf

The do_damping and do_scale_shifts function implements the shelxl damping as described here: http://shelx.uni-ac.gwdg.de/SHELX/shelx.pdf do_scale_shifts aslo compares the maximum shift/esd with convergence_as_shift_over_esd and returns boolean to indicate if the refinement converged according to this criterion These functions do nothing unless called by a derived class

do()
do_damping(value)
do_scale_shifts(limit_shift_over_su)
gradient_threshold = None
had_too_small_a_step()
has_gradient_converged_to_zero()
n_max_iterations = 100
step_threshold = None
track_all = False
track_gradient = False
track_step = False
verbose_iterations = False
class scitbx.lstbx.normal_eqns_solving.journaled_non_linear_ls(non_linear_ls, journal, track_gradient, track_step)

A decorator that keeps the history of the objective, gradient, step, etc of an underlying normal equations object. An instance of this class is a drop-in replacement of that underlying object, with the journaling just mentioned automatically happening behind the scene.

build_up(objective_only=False)
solve()
solve_and_step_forward()
step_forward()
class scitbx.lstbx.normal_eqns_solving.levenberg_marquardt_iterations(non_linear_ls, **kwds)
do()
property mu
tau = 0.001
class scitbx.lstbx.normal_eqns_solving.levenberg_marquardt_iterations_encapsulated_eqns(non_linear_ls, **kwds)
do()
had_too_small_a_step()
objective_decrease_threshold = None
class scitbx.lstbx.normal_eqns_solving.naive_iterations(non_linear_ls, **kwds)
do()
class scitbx.lstbx.normal_eqns_solving.naive_iterations_with_damping(non_linear_ls, **kwds)
damping_value = 0.0007
do()
class scitbx.lstbx.normal_eqns_solving.naive_iterations_with_damping_and_shift_limit(non_linear_ls, **kwds)
convergence_as_shift_over_esd = 1e-05
do()
max_shift_over_esd = 15