Skip to main content

WalkForwardSelector

WalkForwardSelector(
    *args,
    **kwds,
)
Enumeration for different types of model.

Ancestors

  • enum.Enum

Class variables

  • CV: Cross-validated analytics method.
  • ROLLING: Rolling analytics method.

Static methods

from_model_cls

from_model_cls(
    model_cls: Type,
    use_rolling: bool = False,
) ‑> systematica.walk_forward.wf_selector.WalkForwardSelector
Select the appropriate enum member based on model attributes. Parameters:
NameTypeDefaultDescription
model_clsType--Model class to inspect.
use_rollingboolFalseWhether to enforce the rolling method.
Returns:
TypeDescription
WalkForwardSelectorEnum member.
Raises:
TypeDescription
ValueErrorIf the model is incompatible with both rolling and CV methods.

from_model_params

from_model_params(
    model_params: Type,
    use_rolling: bool = False,
) ‑> systematica.walk_forward.wf_selector.WalkForwardSelector
Select the appropriate walk-forward method based on a parameters dictionary. Parameters:
NameTypeDefaultDescription
model_paramsdict--Dictionary of model parameters.
use_rollingboolFalseWhether to enforce the rolling method.
Returns:
TypeDescription
WalkForwardSelectorEnum member corresponding to the suitable walk-forward type.
Raises:
TypeDescription
ValueErrorIf the parameters are incompatible with both rolling and CV methods.

Methods

get_params

get_params(
    self,
    instance: Any,
) ‑> Dict[str, Any]
Retrieve parameters. Parameters:
NameTypeDefaultDescription
instanceAny--The model instance providing configuration attributes.
Returns:
TypeDescription
tp.KwargsParameter dictionary for initializing the walk-forward process.