- class mentpy.optimizers.RCDOpt(mentpy.optimizers.base.BaseOpt)
Class for the random coordinate descent optimizer.
- Parameters:¶
Examples¶
Create a random coordinate descent optimizer
In [1]: opt = mp.optimizers.RCDOpt() In [2]: print(opt) <mentpy.optimizers.rcd.RCDOpt object at 0x7f4941e378e0>
Constructors¶
- RCDOpt(step_size=0.1, adaptive=False)
Initialize the random coordinate descent optimizer.
Methods¶
- optimize(f, x0, num_iters=100, callback=None, verbose=False, **)
Optimize a function f using the random coordinate descent optimizer.
- optimize_and_gradient_norm(f, x0, num_iters=100, callback=None, ...)
Optimize a function f using the random coordinate descent optimizer.
- reset(*args, **kwargs)
- step(f, x, i, **kwargs)
Take a step using the random coordinate descent optimizer.
- update_step_size(x, i, factor=0.99)
Update the step size of the optimizer.