run_SQN_free {stochQN} | R Documentation |
Run SQN optimizer in free-mode
Description
Run the next step of an SQN optimization procedure, after the last requested calculation has been fed to the optimizer. When run for the first time, there is no request, so the function just needs to be run on the object as it is returned from function 'SQN_free'.
Usage
run_SQN_free(optimizer, x, step_size)
Arguments
optimizer |
An 'SQN_free' optimizer, for which its last request must have been served. Will be updated in-place. |
x |
Current values of the variables being optimized. Must be a numeric vector. Will be updated in-place. |
step_size |
Step size for the quasi-Newton update. |
Value
A request with the next piece of required information. The output will be a list with the following levels:
task Requested task (one of "calc_grad", "calc_grad_big_batch", "calc_hess_vec").
requested_on
req_x Values of 'x' at which the requested information (gradient/Hessian) must be calculated.
req_vec Vector by which the Hessian must be multiplied. Will output 'NULL' when this calculation is not needed.
info
x_changed_in_run Whether the 'x' vector was updated.
iteration_number Current iteration number (in terms of quasi-Newton updates).
iteration_info Information about potential problems encountered during the iteration.