Parameter functionality#
Note
Provided through opti_extensions.* namespace.
ParamDict1D#
Custom subclass of dict to define parameters with 1-dim scalar keys.
Constructor#
|
Custom subclass of dict to define parameters with 1-dim scalar keys. |
Attributes#
Name to refer to 1-dim scalar keys. |
|
Name to refer to Dict values. |
Numerical operations#
Calculate the sum of parameter values. |
|
Calculate the minimum of parameter values. |
|
Calculate the maximum of parameter values. |
|
Calculate the mean of parameter values. |
|
Calculate the median of parameter values. |
|
Calculate the high median of parameter values. |
|
Calculate the low median of parameter values. |
Mapping operations#
Remove all items from the ParamDict. |
|
|
Get the parameter value for the specified key, or the default if not found. |
|
Get the parameter value for the specified key, or zero if it is not found. |
|
Remove the specified key and return it's parameter value, or the default if not found. |
Remove and return the last inserted key and parameter value pair from the ParamDict. |
|
|
Get the parameter value for the specified key, or the default if not found. |
Views#
ParamDict1D.items()ParamDict1D.keys()ParamDict1D.values()
ParamDictND#
Custom subclass of dict to define parameters with N-dim tuple keys.
Constructor#
|
Custom subclass of dict to define parameters with N-dim tuple keys. |
Attributes#
Names to refer to each dimension of N-dim tuple keys. |
|
Name to refer to Dict values. |
Numerical operations#
|
Calculate the sum of all parameter values or a subset based on wildcard pattern. |
|
Calculate the minimum of all parameter values or a subset based on wildcard pattern. |
|
Calculate the maximum of all parameter values or a subset based on wildcard pattern. |
|
Calculate the mean of all parameter values or a subset based on wildcard pattern. |
|
Calculate the median of all parameter values or a subset based on wildcard pattern. |
|
Calculate the high median of all parameter values or a subset based on wildcard pattern. |
|
Calculate the low median of all parameter values or a subset based on wildcard pattern. |
Mapping operations#
Remove all items from the ParamDict. |
|
|
Get the parameter value for the specified key, or the default if not found. |
|
Get the parameter value for the specified key, or zero if it is not found. |
|
Remove the specified key and return it's parameter value, or the default if not found. |
Remove and return the last inserted key and parameter value pair from the ParamDict. |
|
|
Get the parameter value for the specified key, or the default if not found. |
Efficient subset selection#
|
Get a subset of the N-dim tuple keys of the Dict with a wildcard pattern. |
|
Get Dict values for all keys that match the wildcard pattern. |
Views#
ParamDictND.items()ParamDictND.keys()ParamDictND.values()
Casting from pandas Series/DataFrame#
Methods to cast pandas Series/DataFrame into ParamDict1D/ParamDictND are provided
through the custom .opti accessor.
Cast a Series into a ParamDict1D/ParamDictND. |
|
Cast a single-column DataFrame into a ParamDict1D/ParamDictND. |