> ## Documentation Index
> Fetch the complete documentation index at: https://systematica.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Wf Selector

> systematica.walk_forward.wf_selector

## `WalkForwardSelector`

```python theme={null}
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`

```python theme={null}
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**:

| Name          | Type   | Default | Description                            |
| ------------- | ------ | ------- | -------------------------------------- |
| `model_cls`   | `Type` | `--`    | Model class to inspect.                |
| `use_rolling` | `bool` | `False` | Whether to enforce the rolling method. |

**Returns**:

| Type                  | Description  |
| --------------------- | ------------ |
| `WalkForwardSelector` | Enum member. |

**Raises**:

| Type         | Description                                                    |
| ------------ | -------------------------------------------------------------- |
| `ValueError` | If the model is incompatible with both rolling and CV methods. |

#### `from_model_params`

```python theme={null}
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**:

| Name           | Type   | Default | Description                            |
| -------------- | ------ | ------- | -------------------------------------- |
| `model_params` | `dict` | `--`    | Dictionary of model parameters.        |
| `use_rolling`  | `bool` | `False` | Whether to enforce the rolling method. |

**Returns**:

| Type                  | Description                                                  |
| --------------------- | ------------------------------------------------------------ |
| `WalkForwardSelector` | Enum member corresponding to the suitable walk-forward type. |

**Raises**:

| Type         | Description                                                          |
| ------------ | -------------------------------------------------------------------- |
| `ValueError` | If the parameters are incompatible with both rolling and CV methods. |

### Methods

#### `get_params`

```python theme={null}
get_params(
    self,
    instance: Any,
) ‑> Dict[str, Any]
```

Retrieve parameters.

**Parameters**:

| Name       | Type  | Default | Description                                            |
| ---------- | ----- | ------- | ------------------------------------------------------ |
| `instance` | `Any` | `--`    | The model instance providing configuration attributes. |

**Returns**:

| Type        | Description                                                     |
| ----------- | --------------------------------------------------------------- |
| `tp.Kwargs` | Parameter dictionary for initializing the walk-forward process. |
