Skip to content

FeaturizationMethod

Source code in docs_src/capo_forecast/types/featurization_method.py
class FeaturizationMethod(TypedDict, closed=True):
    featurization_method_name: (
        "capo_forecast.types.featurization_method_name.FeaturizationMethodName"
    )
    """<p>The name of the method. The "filling" method is the only supported method.</p>"""
    featurization_method_parameters: NotRequired[
        "capo_forecast.types.featurization_method_parameters.FeaturizationMethodParameters"
    ]
    """<p>The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to override the default values. Related Time Series attributes do not accept aggregation parameters.</p> <p>The following list shows the parameters and their valid values for the "filling" featurization method for a <b>Target Time Series</b> dataset. Bold signifies the default value.</p> <ul> <li> <p> <code>aggregation</code>: <b>sum</b>, <code>avg</code>, <code>first</code>, <code>min</code>, <code>max</code> </p> </li> <li> <p> <code>frontfill</code>: <b>none</b> </p> </li> <li> <p> <code>middlefill</code>: <b>zero</b>, <code>nan</code> (not a number), <code>value</code>, <code>median</code>, <code>mean</code>, <code>min</code>, <code>max</code> </p> </li> <li> <p> <code>backfill</code>: <b>zero</b>, <code>nan</code>, <code>value</code>, <code>median</code>, <code>mean</code>, <code>min</code>, <code>max</code> </p> </li> </ul> <p>The following list shows the parameters and their valid values for a <b>Related Time Series</b> featurization method (there are no defaults):</p> <ul> <li> <p> <code>middlefill</code>: <code>zero</code>, <code>value</code>, <code>median</code>, <code>mean</code>, <code>min</code>, <code>max</code> </p> </li> <li> <p> <code>backfill</code>: <code>zero</code>, <code>value</code>, <code>median</code>, <code>mean</code>, <code>min</code>, <code>max</code> </p> </li> <li> <p> <code>futurefill</code>: <code>zero</code>, <code>value</code>, <code>median</code>, <code>mean</code>, <code>min</code>, <code>max</code> </p> </li> </ul> <p>To set a filling method to a specific value, set the fill parameter to <code>value</code> and define the value in a corresponding <code>_value</code> parameter. For example, to set backfilling to a value of 2, include the following: <code>"backfill": "value"</code> and <code>"backfill_value":"2"</code>. </p>"""

featurization_method_name instance-attribute

featurization_method_name: FeaturizationMethodName

The name of the method. The "filling" method is the only supported method.

featurization_method_parameters instance-attribute

featurization_method_parameters: NotRequired[FeaturizationMethodParameters]

The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to override the default values. Related Time Series attributes do not accept aggregation parameters.

The following list shows the parameters and their valid values for the "filling" featurization method for a Target Time Series dataset. Bold signifies the default value.

  • aggregation: sum, avg, first, min, max

  • frontfill: none

  • middlefill: zero, nan (not a number), value, median, mean, min, max

  • backfill: zero, nan, value, median, mean, min, max

The following list shows the parameters and their valid values for a Related Time Series featurization method (there are no defaults):

  • middlefill: zero, value, median, mean, min, max

  • backfill: zero, value, median, mean, min, max

  • futurefill: zero, value, median, mean, min, max

To set a filling method to a specific value, set the fill parameter to value and define the value in a corresponding _value parameter. For example, to set backfilling to a value of 2, include the following: "backfill": "value" and "backfill_value":"2".