## models.Design


A candidate's data: target and drivers transformed, drivers lagged, a trend, a sample.


Usage

``` python
models.Design(**data)
```


`chains` holds each series' resolved transform chain (as explore recorded it in `SeriesMeta.transforms`), applied to the levels by [dazflow.transforms.forward](transforms.forward.md#dazflow.transforms.forward); a series without one is used as it is. `lags[d]` shifts driver `d` by that many periods. With `trend`, a column `trend` counts periods from `trend_start` (1 there), so it extends past the sample unchanged. `start` and `end` are the sample's first and last periods.


## Attributes

| Name | Description |
|----|----|
| [columns](#columns) | The driver columns a model is fitted on: the drivers, then `trend`. |

------------------------------------------------------------------------


#### columns


The driver columns a model is fitted on: the drivers, then `trend`.


`columns: tuple[str, …]`


## Methods

| Name | Description |
|----|----|
| [frames()](#frames) | The target and drivers on the sample, as [fit](models.ModelForm.md#dazflow.models.ModelForm.fit) takes them (`X` None without drivers). |
| [future()](#future) | The drivers for the `h` periods after the sample, from their future `paths` in levels. |

------------------------------------------------------------------------


#### frames()


The target and drivers on the sample, as [fit](models.ModelForm.md#dazflow.models.ModelForm.fit) takes them (`X` None without drivers).


Usage

``` python
frames(levels)
```


A missing value inside the sample is a [ModelError](ModelError.md#dazflow.ModelError): the levels are not those the design was made from.


------------------------------------------------------------------------


#### future()


The drivers for the `h` periods after the sample, from their future `paths` in levels.


Usage

``` python
future(levels, paths, h)
```


Each driver's levels up to the sample's end are followed by its values in `paths` (indexed by period), transformed by its chain and lagged; the trend continues. `None` without drivers.
