Run time parameters
Defines run-time parameterization capabilities.
Attributes
Classes
DynamicParameter
A dynamicly determined parameter, determined at runtime.
This class represents a dynamic parameter that is decided at fit time when there is access to the given dataframe. This allows the parameter to be decided at "run time" depending on the given dataframe
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_selector |
Callable
|
Performs logic in order to decide on a given parameter at run time, using the given DataFrame and optionally y label series. |
required |
fittable |
bool
|
Denotes whether the parameter can be fitted, or should perform the deciding logic every time. |
True
|
Source code in pdpipe/run_time_parameters.py
Functions
fit_transform(X, y=None)
Compute and return the value of this dynamic parameter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
pandas.DataFrame
|
Input dataframe upon which the parameter selector decides which parameter to use. |
required |
y |
pandas.Series
|
Label column, if separated from X dataframe at an earlier stage. Optional. |
None
|
Returns:
Type | Description |
---|---|
object
|
The dynamically determined value of this parameter. |
Source code in pdpipe/run_time_parameters.py
transform()
Return the fitted value of this dynamic parameter.
Returns:
Type | Description |
---|---|
object
|
The fitted value of this dynamic parameter. |
Source code in pdpipe/run_time_parameters.py
Functions
dynamic(parameter_selector, fittable=True)
Return a dynamic parameter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameter_selector |
callable
|
The function or callable implementing the parameter value selection logic based on an input dataframe. |
required |
fittable |
bool
|
Determines whether this dynamic parameter's value should be determined once on fit - in which case all future transforms get the saved value - or, alternatively, the value-selection logic should be performed on both every fit-transform and every transform operation. |
True
|
Returns:
Type | Description |
---|---|
DynamicParameter
|
An object with the parameter selecting logic. |