pypesto.profile.profile_next_guess

Functions

adaptive_step(x, par_index, par_direction, ...)

Group of more complex methods for point proposal.

do_line_search(next_x, step_size_guess, ...)

Perform the line search.

fixed_step(x, par_index, par_direction, ...)

Most simple method to create the next guess.

get_reg_polynomial(par_index, ...)

Compute the regression polynomial.

handle_profile_history(x, par_index, ...)

Compute the very first step direction update guesses.

next_guess(x, par_index, par_direction, ...)

Create the next initial guess for the optimizer.

next_x_interpolate(next_obj, last_obj, ...)

Interpolate between the last two steps.

pypesto.profile.profile_next_guess.adaptive_step(x, par_index, par_direction, options, current_profile, problem, global_opt, order=1)[source]

Group of more complex methods for point proposal.

Step size is automatically computed by a line search algorithm (hence: adaptive).

Parameters:
  • x (ndarray) – The current position of the profiler, size dim_full.

  • par_index (int) – The index of the parameter of the current profile.

  • par_direction (Literal[1, -1]) – The direction, in which the profiling is done (1 or -1).

  • options (ProfileOptions) – Various options applied to the profile optimization.

  • current_profile (ProfilerResult) – The profile which should be computed.

  • problem (Problem) – The problem to be solved.

  • global_opt (float) – Log-posterior value of the global optimum.

  • order (int) –

    Specifies the precise algorithm for extrapolation. Available options are:

    • 0: just one parameter is updated

    • 1: the last two points are used to extrapolate all parameters

    • np.nan: indicates that a more complex regression should be used as determined by pypesto.profile.ProfileOptions.reg_order.

Return type:

ndarray

Returns:

The updated parameter vector, of size dim_full.

pypesto.profile.profile_next_guess.fixed_step(x, par_index, par_direction, options, problem)[source]

Most simple method to create the next guess.

Computes the next point based on the fixed step size given by pypesto.profile.ProfileOptions.default_step_size.

Parameters:
  • x (ndarray) – The current position of the profiler, size dim_full.

  • par_index (int) – The index of the parameter of the current profile.

  • par_direction (Literal[1, -1]) – The direction, in which the profiling is done (1 or -1).

  • options (ProfileOptions) – Various options applied to the profile optimization.

  • problem (Problem) – The problem to be solved.

Return type:

ndarray

Returns:

The updated parameter vector, of size dim_full.

pypesto.profile.profile_next_guess.next_guess(x, par_index, par_direction, profile_options, update_type, current_profile, problem, global_opt)[source]

Create the next initial guess for the optimizer.

Used in order to compute the next profile point. Different proposal methods are available.

Parameters:
  • x (ndarray) – The current position of the profiler.

  • par_index (int) – The index of the parameter of the current profile.

  • par_direction (Literal[1, -1]) – The direction, in which the profiling is done (1 or -1).

  • profile_options (ProfileOptions) – Various options applied to the profile optimization.

  • update_type (Literal['fixed_step', 'adaptive_step_order_0', 'adaptive_step_order_1', 'adaptive_step_regression']) –

    Type of update for next profile point. Available options are:

  • current_profile (ProfilerResult) – The profile which should be computed.

  • problem (Problem) – The problem to be solved.

  • global_opt (float) – Log-posterior value of the global optimum.

Return type:

ndarray

Returns:

The next initial guess as base for the next profile point.