Parameter¶
-
class
glotaran.parameter.parameter.
Parameter
(label: str = None, full_label: str = None, expression: str = None, maximum: int | float = inf, minimum: int | float = - inf, non_negative: bool = False, value: float = None, vary: bool = True)[source]¶ Bases:
object
A parameter for optimization.
- Parameters
label – The label of the parameter.
full_label (str) – The label of the parameter with its path in a parameter group prepended.
Attributes Summary
The expression of the parameter.
The label of the parameter with its path in a parameter group prepended.
Label of the parameter
The upper bound of the parameter.
The lower bound of the parameter.
Indicates if the parameter is non-negativ.
The standard error of the optimized parameter.
The expression of the parameter transformed for evaluation within a ParameterGroup.
The value of the parameter
Indicates if the parameter should be optimized.
Methods Summary
Creates a parameter from a list or numeric value.
Gets the parameter value and bounds with expression and non-negative constraints applied.
Sets all values of the parameter to the values of the corresponding parameter in the group.
Sets the value from an optimization result and reverses non-negative transformation.
Returns true if the label is valid string.
Methods Documentation
-
property
expression
¶ The expression of the parameter.
-
classmethod
from_list_or_value
(value: int | float | list, default_options: dict = None, label: str = None) → Parameter[source]¶ Creates a parameter from a list or numeric value.
- Parameters
value – The list or numeric value.
default_options – A dictionary of default options.
label – The label of the parameter.
-
property
full_label
¶ The label of the parameter with its path in a parameter group prepended.
-
get_value_and_bounds_for_optimization
() → tuple[float, float, float][source]¶ Gets the parameter value and bounds with expression and non-negative constraints applied.
-
property
label
¶ Label of the parameter
-
property
maximum
¶ The upper bound of the parameter.
-
property
minimum
¶ The lower bound of the parameter.
-
property
non_negative
¶ Indicates if the parameter is non-negativ.
If true, the parameter will be transformed with and .
Always False if expression is not None.
-
set_from_group
(group: ParameterGroup)[source]¶ Sets all values of the parameter to the values of the corresponding parameter in the group.
Notes
For internal use.
- Parameters
group – The
glotaran.parameter.ParameterGroup
.
-
set_value_from_optimization
(value: float)[source]¶ Sets the value from an optimization result and reverses non-negative transformation.
-
property
standard_error
¶ The standard error of the optimized parameter.
-
property
transformed_expression
¶ The expression of the parameter transformed for evaluation within a ParameterGroup.
-
property
value
¶ The value of the parameter
-
property
vary
¶ Indicates if the parameter should be optimized.
Always False if expression is not None.