--- title: Models keywords: fastai sidebar: home_sidebar summary: "Uniserie models implementations." description: "Uniserie models implementations." nb_path: "nbs/models.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

ses[source]

ses(X, h, future_xreg, alpha)

{% endraw %} {% raw %}

adida[source]

adida(X, h, future_xreg)

{% endraw %} {% raw %}

historic_average[source]

historic_average(X, h, future_xreg)

{% endraw %} {% raw %}

croston_classic[source]

croston_classic(X, h, future_xreg)

{% endraw %} {% raw %}

croston_sba[source]

croston_sba(X, h, future_xreg)

{% endraw %} {% raw %}

croston_optimized[source]

croston_optimized(X, h, future_xreg)

{% endraw %} {% raw %}

seasonal_window_average[source]

seasonal_window_average(X:ndarray, h:int, future_xreg, season_length:int, window_size:int)

{% endraw %} {% raw %}

seasonal_naive[source]

seasonal_naive(X, h, future_xreg, season_length)

{% endraw %} {% raw %}

imapa[source]

imapa(X, h, future_xreg)

{% endraw %} {% raw %}

naive[source]

naive(X, h, future_xreg)

{% endraw %} {% raw %}

random_walk_with_drift[source]

random_walk_with_drift(X, h, future_xreg)

{% endraw %} {% raw %}

window_average[source]

window_average(X, h, future_xreg, window_size)

{% endraw %} {% raw %}

seasonal_exponential_smoothing[source]

seasonal_exponential_smoothing(X, h, future_xreg, season_length, alpha)

{% endraw %} {% raw %}

tsb[source]

tsb(X, h, future_xreg, alpha_d, alpha_p)

{% endraw %} {% raw %}
{% endraw %} {% raw %}

auto_arima[source]

auto_arima(X:ndarray, h:int, future_xreg=None, season_length:int=1, approximation:bool=False)

{% endraw %} {% raw %}
{% endraw %} {% raw %}
from statsforecast.utils import AirPassengers as ap
{% endraw %} {% raw %}
auto_arima(ap, 12, season_length=12)
array([444.30005077, 418.2100203 , 446.23703401, 488.22892853,
       499.23136059, 562.23063085, 649.23084981, 633.23078411,
       535.23080382, 488.23079791, 417.23079968, 459.23079915])
{% endraw %} {% raw %}
drift = np.arange(1, ap.size + 1)
X = np.vstack([ap, np.log(drift), np.sqrt(drift)]).T
{% endraw %} {% raw %}
newdrift = np.arange(ap.size + 1, ap.size + 7 + 1).reshape(-1, 1)
newxreg = np.concatenate([np.log(newdrift), np.sqrt(newdrift)], axis=1)
{% endraw %} {% raw %}
auto_arima(X, 7, future_xreg=newxreg, season_length=12)
array([448.22763223, 424.00468115, 453.78779314, 497.03025495,
       509.01958041, 572.76982017, 660.35134179])
{% endraw %}