pypesto.profile.profile_next_guess
Functions
|
Group of more complex methods for point proposal. |
|
Restrict a scalar or a vector to given bounds. |
|
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)[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 profilepar_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 computedproblem (
Problem) – The problem to be solved.global_opt (
float) – log-posterior value of the global optimumorder (
int) – Specifies the precise algorithm for extrapolation: can be0( just one parameter is updated),1(last two points used to extrapolate all parameters), andnp.nan(indicates that a more complex regression should be used)
- Returns:
The updated parameter vector, of size dim_full.
- Return type:
x_new
- 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
default_step_sizeinProfileOptions.- Parameters:
x (
ndarray) – The current position of the profiler, size dim_full.par_index (
int) – The index of the parameter of the current profilepar_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.
- Returns:
The updated parameter vector, of size dim_full.
- Return type:
x_new
- 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 (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:fixed_step(seefixed_step()),adaptive_step_order_0,adaptive_step_order_1, oradaptive_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.
- Returns:
The next initial guess as base for the next profile point.
- Return type:
next_guess