poli.core.util.abstract_observer.AbstractObserver

poli.core.util.abstract_observer.AbstractObserver#

class poli.core.util.abstract_observer.AbstractObserver#

Abstract base class for observers in the poli library.

Observers are used to monitor the progress of optimization algorithms by observing the values of the objective function and the decision variables at each iteration.

IMPORTANT: The __init__ function of observer classes MUST NOT require arguments.

observe(x: np.ndarray, y: np.ndarray, context=None) None:#

Observes the values of the objective function and the decision variables at each iteration of the optimization algorithm. If the observer is set in the creation of an objective function, this method will be called every time the objective function is called.

initialize_observer(problem_setup_info: ProblemSetupInformation, caller_info: object, seed: int) object:#

Initializes the observer with the necessary information to monitor the optimization process.

finish() None:#

Performs any necessary cleanup or finalization steps after the optimization process is complete.

__init__()#

Methods

__init__()

finish()

Finish the observer.

initialize_observer(problem_setup_info, ...)

Initialize the observer.

observe(x, y[, context])

Observe the given data points.