Package auto_analyses :: Module frame_order :: Class Optimisation_settings
[hide private]
[frames] | no frames]

Class Optimisation_settings

source code

A special object for storing the settings for optimisation.

This includes grid search information, zooming grid search settings, and settings for the minimisation.

Instance Methods [hide private]
 
__init__(self)
Set up the optimisation settings object.
source code
 
_check_index(self, i, iter_type=None)
Check that the user supplied iteration index makes sense.
source code
 
add_grid(self, inc=None, zoom=None, sobol_max_points=None, sobol_oversample=None, quad_int=False, pivot_search=True)
Add a grid search step.
source code
 
add_min(self, min_algor='simplex', func_tol=1e-25, max_iter=1000000, sobol_max_points=None, sobol_oversample=None, quad_int=False)
Add an optimisation step.
source code
int
get_grid_inc(self, i)
Return the grid increments for the given iteration.
source code
bool
get_grid_pivot_search(self, i)
Return the pivot grid search flag.
source code
bool
get_grid_quad_int(self, i)
Return the SciPy quadratic integration flag for the given iteration.
source code
int, int
get_grid_sobol_info(self, i)
Return the number of numerical integration points and oversampling factor for the given iteration.
source code
None or int
get_grid_zoom_level(self, i)
Return the grid zoom level for the given iteration.
source code
int
get_min_algor(self, i)
Return the minimisation algorithm for the given iteration.
source code
int
get_min_func_tol(self, i)
Return the minimisation function tolerance level for the given iteration.
source code
int
get_min_max_iter(self, i)
Return the maximum number of iterations for the optimisation for the given iteration.
source code
bool
get_min_quad_int(self, i)
Return the SciPy quadratic integration flag for the given iteration.
source code
int, int
get_min_sobol_info(self, i)
Return the number of numerical integration points and oversampling factor for the given iteration.
source code
bool
has_grid(self)
Is a grid search set up?
source code
int
loop_grid(self)
Generator method for looping over all grid search iterations.
source code
int
loop_min(self)
Generator method for looping over all minimisation iterations.
source code
Method Details [hide private]

_check_index(self, i, iter_type=None)

source code 

Check that the user supplied iteration index makes sense.

Parameters:
  • i (int) - The iteration index.
  • iter_type (str) - The type of the index. This can be either 'grid' or 'min'.
Raises:

add_grid(self, inc=None, zoom=None, sobol_max_points=None, sobol_oversample=None, quad_int=False, pivot_search=True)

source code 

Add a grid search step.

Parameters:
  • inc (int) - The grid search size (the number of increments per dimension).
  • zoom (None or int) - The grid zoom level for this grid search.
  • sobol_max_points (None or int) - The maximum number of Sobol' points for the PCS numerical integration to use in the grid search. See the frame_order.sobol_setup user function for details. If not supplied, then the previous value will be used.
  • sobol_oversample (None or int) - The Sobol' oversampling factor. See the frame_order.sobol_setup user function for details.
  • quad_int (bool) - The SciPy quadratic integration flag. See the frame_order.quad_int user function for details.
  • pivot_search (bool) - A flag which if False will prevent the pivot point from being included in the grid search.

add_min(self, min_algor='simplex', func_tol=1e-25, max_iter=1000000, sobol_max_points=None, sobol_oversample=None, quad_int=False)

source code 

Add an optimisation step.

Parameters:
  • min_algor (str) - The optimisation technique.
  • func_tol (int) - The minimisation function tolerance cutoff to terminate optimisation (see the minimise.execute user function).
  • max_iter (int) - The maximum number of iterations for the optimisation.
  • sobol_max_points (None or int) - The maximum number of Sobol' points for the PCS numerical integration to use in the optimisations after the grid search. See the frame_order.sobol_setup user function for details. If not supplied, then the previous value will be used.
  • sobol_oversample (None or int) - The Sobol' oversampling factor. See the frame_order.sobol_setup user function for details.
  • quad_int (bool) - The SciPy quadratic integration flag. See the frame_order.quad_int user function for details.

get_grid_inc(self, i)

source code 

Return the grid increments for the given iteration.

Parameters:
  • i (int) - The grid search iteration from the loop_grid() method.
Returns: int
The grid increments for the iteration.

get_grid_pivot_search(self, i)

source code 

Return the pivot grid search flag.

Parameters:
  • i (int) - The grid search iteration from the loop_grid() method.
Returns: bool
The pivot grid search flag.

get_grid_quad_int(self, i)

source code 

Return the SciPy quadratic integration flag for the given iteration.

Parameters:
  • i (int) - The grid search iteration from the loop_grid() method.
Returns: bool
The SciPy quadratic integration flag for the iteration.

get_grid_sobol_info(self, i)

source code 

Return the number of numerical integration points and oversampling factor for the given iteration.

Parameters:
  • i (int) - The grid search iteration from the loop_grid() method.
Returns: int, int
The number of numerical integration points for the iteration and the oversampling factor.

get_grid_zoom_level(self, i)

source code 

Return the grid zoom level for the given iteration.

Parameters:
  • i (int) - The grid search iteration from the loop_grid() method.
Returns: None or int
The grid zoom level for the iteration.

get_min_algor(self, i)

source code 

Return the minimisation algorithm for the given iteration.

Parameters:
  • i (int) - The minimisation iteration from the loop_min() method.
Returns: int
The minimisation algorithm for the iteration.

get_min_func_tol(self, i)

source code 

Return the minimisation function tolerance level for the given iteration.

Parameters:
  • i (int) - The minimisation iteration from the loop_min() method.
Returns: int
The minimisation function tolerance level for the iteration.

get_min_max_iter(self, i)

source code 

Return the maximum number of iterations for the optimisation for the given iteration.

Parameters:
  • i (int) - The minimisation iteration from the loop_min() method.
Returns: int
The maximum number of iterations for the optimisation for the iteration.

get_min_quad_int(self, i)

source code 

Return the SciPy quadratic integration flag for the given iteration.

Parameters:
  • i (int) - The minimisation iteration from the loop_min() method.
Returns: bool
The SciPy quadratic integration flag for the iterationor.

get_min_sobol_info(self, i)

source code 

Return the number of numerical integration points and oversampling factor for the given iteration.

Parameters:
  • i (int) - The minimisation iteration from the loop_min() method.
Returns: int, int
The number of numerical integration points for the iteration and the oversampling factor.

has_grid(self)

source code 

Is a grid search set up?

Returns: bool
True if a grid search has been set up.

loop_grid(self)

source code 

Generator method for looping over all grid search iterations.

Returns: int
The grid search iteration.

loop_min(self)

source code 

Generator method for looping over all minimisation iterations.

Returns: int
The minimisation iteration.