pastas.model.Model.set_parameter#
- pastas.model.Model.set_parameter(name: str, initial: float | None = None, vary: bool | None = None, pmin: float | None = None, pmax: float | None = None, optimal: float | None = None, dist: str | None = None, move_bounds: bool = False) None#
Method to change the parameter properties.
- Parameters:
name (str) – name of the parameter to update. This has to be a single variable.
initial (float, optional) – parameters value to use as initial estimate.
vary (bool, optional) – boolean to vary a parameter (True) or not (False).
pmin (float, optional) – minimum value for the parameter.
pmax (float, optional) – maximum value for the parameter.
optimal (float, optional) – optimal value for the parameter.
dist (str, optional) – Distribution of the parameters.
move_bounds (bool, optional) – Reset pmin/pmax based on new initial value. Of move_bounds=True, pmin and pmax must be None.
Examples
>>> ml.set_parameter(name="constant_d", initial=10, vary=True, >>> pmin=-10, pmax=20)
Notes
It is highly recommended to use this method to set parameter properties. Changing the parameter properties directly in the parameter DataFrame may not work as expected.