ribs.emitters.opt.GradientAscentOpt

class ribs.emitters.opt.GradientAscentOpt(theta0, lr)[source]

Vanilla gradient ascent.

Parameters
  • theta0 (array-like) – Initial solution. 1D array.

  • lr (float) – Learning rate for the update.

Methods

reset(theta0)

Resets the solution point to a new value.

step(gradient)

Ascends the solution based on the given gradient.

Attributes

theta

The current solution point.

reset(theta0)[source]

Resets the solution point to a new value.

Parameters

theta0 (array-like) – The new solution point. 1D array.

step(gradient)[source]

Ascends the solution based on the given gradient.

Parameters

gradient (array-like) – The (estimated) gradient of the current solution point. 1D array.

property theta

The current solution point.