simpeg.utils.eigenvalue_by_power_iteration#
- simpeg.utils.eigenvalue_by_power_iteration(combo_objfct, model, n_pw_iter=4, fields_list=None, random_seed=None, seed=None)[source]#
Estimate largest eigenvalue in absolute value using power iteration.
Uses the power iteration approach to estimate the largest eigenvalue in absolute value for a single
simpeg.BaseObjectiveFunctionor a combination of objective functions stored in asimpeg.ComboObjectiveFunction.- Parameters:
- combo_objfct
simpeg.BaseObjectiveFunction Objective function or a combo objective function
- model
numpy.ndarray Current model
- n_pw_iter
int Number of power iterations used to estimate the highest eigenvalue
- fields_list
list(optional) listof fields objects for each data misfit term in combo_objfct. If none given, they will be evaluated within the function. If combo_objfct mixs data misfit and regularization terms, the list should contains simpeg.fields for the data misfit terms and None for the regularization term.- random_seed
NoneorRandomSeed,optional Random seed for the initial random guess of eigenvector. It can either be an int, a predefined Numpy random number generator, or any valid input to
numpy.random.default_rng.- seed
NoneorRandomSeed,optional Deprecated since version 0.23.0: Argument
seedis deprecated in favor ofrandom_seedand will be removed in SimPEG v0.24.0.
- combo_objfct
- Returns:
floatEstimated value of the highest eigenvalue in absolute value
Notes
After k power iterations, the largest eigenvalue in absolute value is approximated by the Rayleigh quotient:
\[\lambda_k = \frac{\mathbf{x_k^T A x_k}}{\mathbf{x_k^T x_k}}\]where \(\mathbf{A}\) is our matrix and \(\mathbf{x_k}\) is computed recursively according to:
\[\mathbf{x_{k+1}} = \frac{\mathbf{A x_k}}{\| \mathbf{Ax_k} \|}\]The elements of the initial vector \(\mathbf{x_0}\) are randomly selected from a uniform distribution.