simpeg.optimization.ProjectedGradient#

class simpeg.optimization.ProjectedGradient(*, lower=-inf, upper=inf, cg_rtol=0.1, cg_maxiter=5, **kwargs)[source]#

Bases: Bounded, InexactCG, Minimize, Remember

Attributes

callback

A used defined callback function.

cg_atol

Absolute tolerance for inner CG iterations.

cg_maxiter

Maximum number of CG iterations.

cg_rtol

Relative tolerance for inner CG iterations.

lower

The lower bound value.

maxIterCG

InexactCG.maxIterCG has been deprecated.

tolCG

InexactCG.tolCG has been deprecated.

upper

The upper bound value.

counter

parent

print_type

Methods

activeSet(x)

If we are on a bound

bindingSet(x)

If we are on a bound and the negative gradient points away from the feasible set.

doEndIteration(xt)

Operation called at the end of each minimize iteration.

doStartIteration()

Called at the start of each minimize iteration. If you have things that also need to run in the method doStartIteration, you can create a method::.

findSearchDirection()

Finds the search direction based on either CG or steepest descent.

finish()

Called at the end of the optimization. If you have things that also need to run in the method finish, you can create a method::.

inactiveSet(x)

The free variables.

minimize(evalFunction, x0)

Minimizes the function (evalFunction) starting at the location x0.

modifySearchDirection(p)

Changes the search direction based on some sort of linesearch or trust-region criteria.

modifySearchDirectionBreak(p)

Called if modifySearchDirection fails to find a descent direction.

printDone([inLS])

Called at the end of the optimization routine.

printInit([inLS])

Called at the beginning of the optimization routine.

printIter([inLS])

Called directly after function evaluations.

projection(x)

Make sure we are feasible.

scaleSearchDirection(p)

Scales the search direction if appropriate.

startup(x0)

Called at the start of any new minimize call.

recall

remember

save

stoppingCriteria