mri.optimizers.base#

Common function to run online and offline algorithms.

run_algorithm(opt, max_nb_of_iter, verbose=0)[source]#

Run the algorithm setup with the defined optimizer.

Parameters
  • opt (Optimizer Class) –

  • max_nb_of_iter (int) – Maximum number of iteration

  • verbose (int) – Verbosity level.

Returns

  • x_final (numpy.ndarray) – the estimated solution.

  • costs (list of float) – the cost function values.

  • metrics (dict) – the requested metrics values during the optimization.

run_online_algorithm(opt, kspace_generator, estimate_call_period=None, verbose=0)[source]#

Run online optimisation algorithm.

At each step the obs_data is updated via the kspace_generator.

Parameters
  • opt (instance of SetUp) – optimisation algorithm instance

  • kspace_generator (instance of BaseKspaceGenerator) – The kspace_generator yielding the observed data to be updated.

  • estimate_call_period (int, default None) – The period over which to retrieve an estimate of the online algorithm. If None, only the last estimate is retrieved.