nemos.solvers.supports_stochastic#

nemos.solvers.supports_stochastic(solver_name)[source]#

Check if a solver supports stochastic optimization.

Parameters:

solver_name (str) – Name of the solver (e.g., ‘GradientDescent’, ‘SVRG’).

Returns:

True if the solver supports stochastic optimization via stochastic_run and has the _supports_stochastic class variable set to True.

Return type:

bool

Raises:

ValueError – If the solver name is not found in the registry.

Examples

>>> import nemos as nmo
>>> nmo.solvers.supports_stochastic("GradientDescent")
True
>>> nmo.solvers.supports_stochastic("BFGS")
False