pypesto.profile.profile_next_guess
Functions
|
Group of more complex methods for point proposal. |
|
Perform the line search. |
|
Most simple method to create the next guess. |
|
Compute the regression polynomial. |
|
Compute the very first step direction update guesses. |
|
Create the next initial guess for the optimizer. |
|
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, min_step_increase_factor=1.0, max_step_reduce_factor=1.0)[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 (1or-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 updated1: the last two points are used to extrapolate all parametersnp.nan: indicates that a more complex regression should be used as determined bypypesto.profile.ProfileOptions.reg_order.
min_step_increase_factor (
float) – Factor to increase the minimal step size bound.max_step_reduce_factor (
float) – Factor to reduce the maximal step size bound.
- Return type:
- 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 (1or-1).options (
ProfileOptions) – Various options applied to the profile optimization.problem (
Problem) – The problem to be solved.
- Return type:
- 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, min_step_increase_factor=1.0, max_step_reduce_factor=1.0)[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 (1or-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:
fixed_step(seefixed_step())adaptive_step_order_0(seeadaptive_step()).adaptive_step_order_1(seeadaptive_step()).adaptive_step_regression(seeadaptive_step()).
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.min_step_increase_factor (
float) – Factor to increase the minimal step size bound. Used only inadaptive_step().max_step_reduce_factor (
float) – Factor to reduce the maximal step size bound. Used only inadaptive_step().
- Return type:
- Returns:
The next initial guess as base for the next profile point.