limits#
Limits for the solver variables
- class wip.modules.limits.Limits[source]#
Bases:
object
Methods
define_limit_by_normalization
(scalers, ...)Define upper and lower bounds by variable normalization.
define_limit_by_quantile
(feature, ...)Define upper and lower bounds by percentiles.
define_limit_by_rolling_mean
(feature, ...)Set lower- and upper-bound for a variable defined inside
wip.files.rolling_limits
.parse_limits
(limits)Parse json limits:
read_limits
(limits[, feature])Read and return the limit's values
define_bentonita_limit
define_constant_limits
define_flotcor_limit
define_work_dataset
limits_by_rolling_mean
- static define_limit_by_normalization(scalers, feature, limits)[source]#
Define upper and lower bounds by variable normalization.
Returns both values when lmin and lmax are defined Return a left value when only lmin is defined Return a right value when only lmax is defined
- static define_limit_by_quantile(feature, models_features, production_query, limits)[source]#
Define upper and lower bounds by percentiles.
- Parameters
- static define_limit_by_rolling_mean(feature, production_query, datasets, rolling_limits)[source]#
Set lower- and upper-bound for a variable defined inside
wip.files.rolling_limits
.- Parameters
feature (
str
) – The tag name defined as dictionary key insidewip.files.rolling_limits
.production_query –
datasets (
Dict[str
,pd.DataFrame]
) – Dictionary ofpandas.DataFrame
with the input datasets.rolling_limits (
Dict[str
,Dict[str
,int | float]]
) – Dictionary containing the rolling limits to be used for defining the optimization variable’s lower- and upper-bounds.
- Returns
Lower- and upper-bounds calculated from the rolling limit.
- Return type
Tuple[float
,float]