Diagnostic Information

In Using Py-BOBYQA, we saw that the output of Py-BOBYQA returns a container which includes diagnostic information about the progress of the algorithm (soln.diagnostic_info). This object is a Pandas DataFrame, with one row per iteration of the algorithm. If Pandas is not available, it returns a dictionary where each key listed below has a list of values, one per iteration of the algorithm. In this section, we explain the meaning of each type of output (the columns of the DataFrame).

To save this information to a CSV file, use:

# Previously: define objfun and x0

# Turn on diagnostic information
user_params = {'logging.save_diagnostic_info': True}

# Call Py-BOBYQA
soln = pybobyqa.solve(objfun, x0, user_params=user_params)

# Save diagnostic info to CSV
soln.diagnostic_info.to_csv("myfile.csv")

Depending on exactly how Py-BOBYQA terminates, the last row of results may not be fully populated.

Current Iterate

  • xk - Best point found so far (current iterate). This is only saved if user_params['logging.save_xk'] = True.

  • fk - The value of \(f\) at the current iterate.

Trust Region

  • rho - The lower bound on the trust region radius \(\rho_k\).

  • delta - The trust region radius \(\Delta_k\).

  • norm_sk - The norm of the trust region step \(\|s_k\|\).

Model Interpolation

  • npt - The number of interpolation points.

  • interpolation_error - The sum of squares of the interpolation errors from the interpolated model.

  • interpolation_condition_number - The condition number of the matrix in the interpolation linear system.

  • interpolation_change_g_norm - The norm of the change in model gradient at this iteration, \(\|g_k-g_{k-1}\|\).

  • interpolation_change_H_norm - The Frobenius norm of the change in model Hessian at this iteration, \(\|H_k-H_{k-1}\|_F\).

  • poisedness - The smallest value of \(\Lambda\) for which the current interpolation set \(Y_k\) is \(\Lambda\)-poised in the current trust region. This is the most expensive piece of information to compute, and is only computed if user_params['logging.save_poisedness' = True.

  • max_distance_xk - The maximum distance from any interpolation point to the current iterate.

  • norm_gk - The norm of the model gradient \(\|g_k\|\).

Iteration Count

  • nruns - The number of times the algorithm has been restarted.

  • nf - The number of objective evaluations so far (see soln.nf)

  • nx - The number of points at which the objective has been evaluated so far (see soln.nx)

  • nsamples - The total number of objective evaluations used for all current interpolation points.

  • iter_this_run - The number of iterations since the last restart.

  • iters_total - The total number of iterations so far.

Algorithm Progress

  • iter_type - A text description of what type of iteration we had (e.g. Successful, Safety, etc.)

  • ratio - The ratio of actual to predicted objective reduction in the trust region step.

  • slow_iter - Equal to 1 if the current iteration is successful but slow, 0 if is successful but not slow, and -1 if was not successful.