Bases: Generator
Nelder-Mead algorithm from SciPy in Xopt's Generator form.
Converted to use a state machine to resume in exactly the last state.
Source code in xopt/generators/scipy/neldermead.py
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 | def __init__(self, **kwargs):
super().__init__(**kwargs)
# Initialize the first candidate if not given
if self.initial_point is None:
self.initial_point = self.vocs.random_inputs()[0]
self._saved_options = self.model_dump(
exclude={"current_state", "future_state"}
).copy() # Used to keep track of changed options
if self.initial_simplex:
self._initial_simplex = np.array(
[self.initial_simplex[k] for k in self.vocs.variable_names]
).T
else:
self._initial_simplex = None
|
Attributes
xopt.generators.scipy.neldermead.NelderMeadGenerator.simplex
property
Returns the simplex in the current state.
xopt.generators.scipy.neldermead.NelderMeadGenerator.x0
property
Raw internal initial point for convenience