

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

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

<a
href="https://github.com/mustafaslanCoto/peshbeen/blob/main/peshbeen/models/ets.py#L16"
target="_blank" style="float:right; font-size:smaller">source</a>

### ets

``` python

def ets(
    target_col:str, # Name of the target variable column.
    trend:Optional[str]=None, # Trend component type.
    damped_trend:bool=False, # Whether to damp the trend.  Only meaningful when ``trend`` is not `None`.
    seasonal:Optional[str]=None, # Seasonal component type.
    seasonal_periods:Optional[int]=None, # Number of periods in a complete seasonal cycle — e.g. 12 for monthly data with an annual cycle.  Required when ``seasonal`` is not ``None``.
    initialization_method:Optional[str]='estimated', # How to initialise the recursions.  When `"known"` is chosen, `initial_level` (and `initial_trend` / `initial_seasonal` where applicable) must also be provided.
    initial_level:Optional[float]=None, # Initial level value.  Required when `initialization_method=`"known"`.
    initial_trend:Optional[float]=None, # Initial trend value.  Required when `initialization_method=`"known"` and the model has a trend component.
    initial_seasonal:Optional[list]=None, # Initial seasonal factors (length `seasonal_periods` or ``seasonal_periods - 1``).  Required when ``initialization_method="known"`` and the model is seasonal.
    bounds:Optional[dict]=None, # Parameter bounds passed to ``ExponentialSmoothing``, e.g. `{"smoothing_level": (0, 1)}`.
    dates:NoneType=None, # Datetime index for the series.  Inferred automatically when `endog` is a Pandas object with a `DatetimeIndex`.
    freq:Optional[str]=None, # Frequency of the time series (e.g. ``"M"``, ``"D"``).  Optional when `dates` is provided.
    missing:str='none', # How to handle ``NaN`` values in the input series.
    optimized:bool=True, # Estimate smoothing parameters by maximising the log-likelihood.
    smoothing_level:Optional[float]=None, # Fixed alpha value.  When set, this value is used directly and not optimised.
    smoothing_trend:Optional[float]=None, # Fixed beta value.  Only used when the model has a trend component.
    smoothing_seasonal:Optional[float]=None, # Fixed gamma value.  Only used when the model is seasonal.
    damping_trend:Optional[float]=None, # Fixed phi (damping) value.  Only used when ``damped_trend=True``.
    remove_bias:bool=False, # Remove bias from forecast values by enforcing that the mean residual is zero.
    start_params:NoneType=None, # Starting parameter values for the optimiser.
    method:Optional[str]=None, # Optimisation method — one of `"L-BFGS-B"` (default), `"TNC"`, `"SLSQP"`, `"Powell"`, `"trust-constr"`, `"basinhopping"` (alias `"bh"`), or `"least_squares"` (alias `"ls"`).
    minimize_kwargs:Optional[dict]=None, # Extra keyword arguments forwarded to the chosen SciPy minimiser.
    use_brute:bool=True, # Search for good starting values with a brute-force grid search before running the main optimiser.
    box_cox:Union[bool, float]=False, # Whether to apply Box-Cox transformation to the target variable. If a float value is provided, it will be used as the lambda parameter for the Box-Cox transformation. If True, the lambda parameter will be estimated from the data.
    box_cox_biasadj:bool=False, # Bias adjustment when inverting the manual Box-Cox on forecasts.
    fit_kwargs:Optional[dict]=None, # Any additional keyword arguments forwarded verbatim to `ExponentialSmoothing.fit`.
)->None: # Fitted model object with a ``forecast`` method for making predictions and properties for information criteria scores (AIC, BIC, etc.)

```

*Holt-Winters Exponential Smoothing forecaster.*

A thin wrapper around
`statsmodels.tsa.holtwinters.ExponentialSmoothing`.

<table>
<colgroup>
<col style="width: 6%" />
<col style="width: 25%" />
<col style="width: 34%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Default</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>target_col</td>
<td>str</td>
<td></td>
<td>Name of the target variable column.</td>
</tr>
<tr>
<td>trend</td>
<td>Optional[str]</td>
<td>None</td>
<td>Trend component type.</td>
</tr>
<tr>
<td>damped_trend</td>
<td>bool</td>
<td>False</td>
<td>Whether to damp the trend. Only meaningful when <code>trend</code>
is not <code>None</code>.</td>
</tr>
<tr>
<td>seasonal</td>
<td>Optional[str]</td>
<td>None</td>
<td>Seasonal component type.</td>
</tr>
<tr>
<td>seasonal_periods</td>
<td>Optional[int]</td>
<td>None</td>
<td>Number of periods in a complete seasonal cycle — e.g. 12 for monthly
data with an annual cycle. Required when <code>seasonal</code> is not
<code>None</code>.</td>
</tr>
<tr>
<td>initialization_method</td>
<td>Optional[str]</td>
<td>estimated</td>
<td>How to initialise the recursions. When <code>"known"</code> is
chosen, <code>initial_level</code> (and <code>initial_trend</code> /
<code>initial_seasonal</code> where applicable) must also be
provided.</td>
</tr>
<tr>
<td>initial_level</td>
<td>Optional[float]</td>
<td>None</td>
<td>Initial level value. Required when
<code>initialization_method=</code>“known”<code>. | | initial_trend | Optional[float] | None | Initial trend value.  Required when</code>initialization_method=<code>"known"</code>
and the model has a trend component.</td>
</tr>
<tr>
<td>initial_seasonal</td>
<td>Optional[list]</td>
<td>None</td>
<td>Initial seasonal factors (length <code>seasonal_periods</code> or
<code>seasonal_periods - 1</code>). Required when
<code>initialization_method="known"</code> and the model is
seasonal.</td>
</tr>
<tr>
<td>bounds</td>
<td>Optional[dict]</td>
<td>None</td>
<td>Parameter bounds passed to <code>ExponentialSmoothing</code>,
e.g. <code>{"smoothing_level": (0, 1)}</code>.</td>
</tr>
<tr>
<td>dates</td>
<td>NoneType</td>
<td>None</td>
<td>Datetime index for the series. Inferred automatically when
<code>endog</code> is a Pandas object with a
<code>DatetimeIndex</code>.</td>
</tr>
<tr>
<td>freq</td>
<td>Optional[str]</td>
<td>None</td>
<td>Frequency of the time series (e.g. <code>"M"</code>,
<code>"D"</code>). Optional when <code>dates</code> is provided.</td>
</tr>
<tr>
<td>missing</td>
<td>str</td>
<td>none</td>
<td>How to handle <code>NaN</code> values in the input series.</td>
</tr>
<tr>
<td>optimized</td>
<td>bool</td>
<td>True</td>
<td>Estimate smoothing parameters by maximising the log-likelihood.</td>
</tr>
<tr>
<td>smoothing_level</td>
<td>Optional[float]</td>
<td>None</td>
<td>Fixed alpha value. When set, this value is used directly and not
optimised.</td>
</tr>
<tr>
<td>smoothing_trend</td>
<td>Optional[float]</td>
<td>None</td>
<td>Fixed beta value. Only used when the model has a trend
component.</td>
</tr>
<tr>
<td>smoothing_seasonal</td>
<td>Optional[float]</td>
<td>None</td>
<td>Fixed gamma value. Only used when the model is seasonal.</td>
</tr>
<tr>
<td>damping_trend</td>
<td>Optional[float]</td>
<td>None</td>
<td>Fixed phi (damping) value. Only used when
<code>damped_trend=True</code>.</td>
</tr>
<tr>
<td>remove_bias</td>
<td>bool</td>
<td>False</td>
<td>Remove bias from forecast values by enforcing that the mean residual
is zero.</td>
</tr>
<tr>
<td>start_params</td>
<td>NoneType</td>
<td>None</td>
<td>Starting parameter values for the optimiser.</td>
</tr>
<tr>
<td>method</td>
<td>Optional[str]</td>
<td>None</td>
<td>Optimisation method — one of <code>"L-BFGS-B"</code> (default),
<code>"TNC"</code>, <code>"SLSQP"</code>, <code>"Powell"</code>,
<code>"trust-constr"</code>, <code>"basinhopping"</code> (alias
<code>"bh"</code>), or <code>"least_squares"</code> (alias
<code>"ls"</code>).</td>
</tr>
<tr>
<td>minimize_kwargs</td>
<td>Optional[dict]</td>
<td>None</td>
<td>Extra keyword arguments forwarded to the chosen SciPy
minimiser.</td>
</tr>
<tr>
<td>use_brute</td>
<td>bool</td>
<td>True</td>
<td>Search for good starting values with a brute-force grid search
before running the main optimiser.</td>
</tr>
<tr>
<td>box_cox</td>
<td>Union[bool, float]</td>
<td>False</td>
<td>Whether to apply Box-Cox transformation to the target variable. If a
float value is provided, it will be used as the lambda parameter for the
Box-Cox transformation. If True, the lambda parameter will be estimated
from the data.</td>
</tr>
<tr>
<td>box_cox_biasadj</td>
<td>bool</td>
<td>False</td>
<td>Bias adjustment when inverting the manual Box-Cox on forecasts.</td>
</tr>
<tr>
<td>fit_kwargs</td>
<td>Optional[dict]</td>
<td>None</td>
<td>Any additional keyword arguments forwarded verbatim to
<code>ExponentialSmoothing.fit</code>.</td>
</tr>
<tr>
<td><strong>Returns</strong></td>
<td><strong>None</strong></td>
<td></td>
<td><strong>Fitted model object with a <code>forecast</code> method for
making predictions and properties for information criteria scores (AIC,
BIC, etc.)</strong></td>
</tr>
</tbody>
</table>

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

<a
href="https://github.com/mustafaslanCoto/peshbeen/blob/main/peshbeen/models/ets.py#L191"
target="_blank" style="float:right; font-size:smaller">source</a>

### ets.fit

``` python

def fit(
    df:pd.DataFrame, # Training DataFrame containing the target column
)->None:

```

*Fit `ExponentialSmoothing` to the training data.*

<table>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>df</td>
<td>pd.DataFrame</td>
<td>Training DataFrame containing the target column</td>
</tr>
<tr>
<td><strong>Returns</strong></td>
<td><strong>None</strong></td>
<td></td>
</tr>
</tbody>
</table>

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

<a
href="https://github.com/mustafaslanCoto/peshbeen/blob/main/peshbeen/models/ets.py#L351"
target="_blank" style="float:right; font-size:smaller">source</a>

### ets.forecast

``` python

def forecast(
    H:int, # Forecast horizon.
    exog:Optional[pd.DataFrame]=None, # Accepted for API consistency with other models but silently ignored — ETS forecasts do not use exogenous variables.
)->np.ndarray: # Forecast values of length `H`.

```

*Multi-step forecast.*

<table>
<colgroup>
<col style="width: 6%" />
<col style="width: 25%" />
<col style="width: 34%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Default</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>H</td>
<td>int</td>
<td></td>
<td>Forecast horizon.</td>
</tr>
<tr>
<td>exog</td>
<td>Optional[pd.DataFrame]</td>
<td>None</td>
<td>Accepted for API consistency with other models but silently ignored
— ETS forecasts do not use exogenous variables.</td>
</tr>
<tr>
<td><strong>Returns</strong></td>
<td><strong>np.ndarray</strong></td>
<td></td>
<td><strong>Forecast values of length <code>H</code>.</strong></td>
</tr>
</tbody>
</table>

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

<a
href="https://github.com/mustafaslanCoto/peshbeen/blob/main/peshbeen/models/ets.py#L389"
target="_blank" style="float:right; font-size:smaller">source</a>

### ets.cross_validate

``` python

def cross_validate(
    df:pd.DataFrame, # Full dataset
    cv_split:int, # Number of CV folds.
    test_size:int, # Test window size per fold.
    metrics:List[Callable], # Metric functions (e.g. ``[MAE, RMSE]``) used to evaluate forecast accuracy across folds. Call ``.cv_summary()`` after cross-validation to retrieve the aggregated scores.
    step_size:int=1, # Step size to advance the test window each fold.
    h_split_point:Optional[int]=None, # Split the test window into two sub-horizons for separate short- and long-term evaluation.
)->Tuple[pd.DataFrame, pd.DataFrame]: # Summary DataFrame with mean metric scores across folds, and (optionally) a fold-level DataFrame with true vs. predicted values for each fold.

```

*Run time-series cross-validation.*

<table>
<colgroup>
<col style="width: 6%" />
<col style="width: 25%" />
<col style="width: 34%" />
<col style="width: 34%" />
</colgroup>
<thead>
<tr>
<th></th>
<th><strong>Type</strong></th>
<th><strong>Default</strong></th>
<th><strong>Details</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>df</td>
<td>pd.DataFrame</td>
<td></td>
<td>Full dataset</td>
</tr>
<tr>
<td>cv_split</td>
<td>int</td>
<td></td>
<td>Number of CV folds.</td>
</tr>
<tr>
<td>test_size</td>
<td>int</td>
<td></td>
<td>Test window size per fold.</td>
</tr>
<tr>
<td>metrics</td>
<td>List[Callable]</td>
<td></td>
<td>Metric functions (e.g. <code>[MAE, RMSE]</code>) used to evaluate
forecast accuracy across folds. Call <code>.cv_summary()</code> after
cross-validation to retrieve the aggregated scores.</td>
</tr>
<tr>
<td>step_size</td>
<td>int</td>
<td>1</td>
<td>Step size to advance the test window each fold.</td>
</tr>
<tr>
<td>h_split_point</td>
<td>Optional[int]</td>
<td>None</td>
<td>Split the test window into two sub-horizons for separate short- and
long-term evaluation.</td>
</tr>
<tr>
<td><strong>Returns</strong></td>
<td><strong>Tuple[pd.DataFrame, pd.DataFrame]</strong></td>
<td></td>
<td><strong>Summary DataFrame with mean metric scores across folds, and
(optionally) a fold-level DataFrame with true vs. predicted values for
each fold.</strong></td>
</tr>
</tbody>
</table>
