tick.solver.History

class tick.solver.History[source]

A class to manage the history along iterations of a solver

Attributes

print_order : list or str

The list of values to print along iterations

values : dict

A dict containing the history. Key is the value name and values are the values taken along the iterations

last_values : dict

A dict containing all the last history values

_minimum_col_width : int

Minimal size of a column when printing the history

_minimizer : None or numpy.ndarray

The minimizer of the objective. None if not specified. This is useful to compute a distance to the optimum.

_minimum : None or float

The minimal (optimal) value of the objective. None if not specified. This is useful to compute a distance to the optimum.

_print_style : list or str

The display style of all printed numbers

_history_func : dict

A dict given for all values the function to be applied before saving and displaying in history. This is useful for computing the sparsity, the rank, among other things, of the iterates along iterations of the solver

_n_iter : int

The current iteration number

_col_widths : list or int

A list containing the computed width of each column used for printing the history, based on the name length of the column

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

print_full_history()[source]

Verbose the whole history

set_minimizer(minimizer: numpy.ndarray)[source]

Set the minimizer of the objective, to compute distance to it along iterations

Parameters

minimizer : numpy.ndarray, shape=(n_coeffs,)

The minimizer of the objective

Notes

This adds dist_coeffs in history (distance to the minimizer) which is printed along iterations

set_minimum(minimum: float)[source]

Set the minimum of the objective, to compute distance to the optimum along iterations

Parameters

minimum : float

The minimizer of the objective

Notes

This adds dist_obj in history (distance to the minimum) which is printed along iterations