smt_optim.utils package#
Submodules#
smt_optim.utils.constraints module#
smt_optim.utils.get_fmin module#
smt_optim.utils.initial_design module#
smt_optim.utils.json module#
smt_optim.utils.logger module#
smt_optim.utils.multi_obj module#
- class PymooStateWrapper(state, scaled: bool = False, train: bool = True)[source]#
Bases:
Problem- bounds()#
- do(X, return_values_of, *args, **kwargs)#
- evaluate(X, *args, return_values_of=None, return_as_dictionary=False, **kwargs)#
- has_bounds()#
- has_constraints()#
- ideal_point(*args, use_cache=True, set_cache=True, **kwargs)#
- property n_constr#
- nadir_point(*args, use_cache=True, set_cache=True, **kwargs)#
- name()#
- pareto_front(*args, use_cache=True, set_cache=True, **kwargs)#
- pareto_set(*args, use_cache=True, set_cache=True, **kwargs)#
- get_pareto_front(Y: ndarray) ndarray[source]#
Return the non-dominated objective vectors from
Y.- Parameters:
Y (np.ndarray) – Array of shape
(n_samples, n_objectives)containing objective values for each sample.- Returns:
Array of shape
(n_pareto, n_objectives)containing the non-dominated objective vectors (the Pareto front).- Return type:
np.ndarray
Notes
Assumes a minimization problem for all objectives and no constraints.
- get_pf_from_dataset(dataset, ctol: float = 0.0001, fid: int = -1, return_dict: bool = False) ndarray | dict[source]#
- hypervolume(pf: ndarray, ref: ndarray) float[source]#
Compute the hypervolume indicator of the Pareto front.
Uses the moocore implementation: https://multi-objective.github.io/moocore/python/reference/generated/moocore.hypervolume.html
- Parameters:
pf (np.ndarray of shape (num_points, 2)) – Pareto front.
ref (np.ndarray of shape (2, )) – Reference objective values.
- Returns:
float – Hypervolume indicator value.
Notes – Assume both objective are minimized.
- hypervolume_2d(pf: ndarray, ref: ndarray) float[source]#
Compute the 2D hypervolume indicator he hypervolume of the Pareto front.
- Parameters:
pf (np.ndarray of shape (num_points, 2)) – Pareto front.
ref (np.ndarray of shape (2, )) – Reference objective values.
- Returns:
float – Hypervolume indicator value.
Notes – Assume both objective are minimized.