Slackbot
11/14/2023, 4:45 PMChad Parmet
11/14/2023, 4:45 PMfrom statsforecast import StatsForecast
from statsforecast.models import Naive
naive_model = StatsForecast(models = [Naive()],
freq = 'MS',
n_jobs = 1)
naive_model.fit(X_naive_model)
Chad Parmet
11/14/2023, 4:46 PMChad Parmet
11/14/2023, 4:48 PMfor i in range(50):
StatsForecast(models = [Naive()],
freq = 'MS',
n_jobs = 1).fit(X_naive_model)
Result: No warningChad Parmet
11/14/2023, 4:48 PMChad Parmet
11/14/2023, 4:49 PMJosé Morales
11/14/2023, 4:56 PMChad Parmet
11/14/2023, 4:57 PMNaive()
on series with one data point, and RandomWalkWithDrift()
on series with >1José Morales
11/14/2023, 5:03 PMimport warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore', category=RuntimeWarning)
naive_model.fit(...)
Chad Parmet
11/14/2023, 5:07 PMJosé Morales
11/14/2023, 5:16 PMChad Parmet
11/14/2023, 7:34 PMJosé Morales
11/14/2023, 7:48 PMChad Parmet
11/14/2023, 7:50 PM