LoslegenKostenlos loslegen

auto.arima() function

We can use the auto.arima function to help us automatically select a good starting model to build. Your regional sales data summed up for all products in the metropolitan region is loaded in your workspace as the MET_t object. We are going to use the index function to help with these dates.

Diese Übung ist Teil des Kurses

Forecasting Product Demand in R

Kurs anzeigen

Anleitung zur Übung

  • Split the data into both a training and validation piece with validation being all of your 2017 data. The training piece has been done for you, but you try the validation! Make sure to use the YYYY-MM-DD format for the date.
  • Run the auto.arima() function on your metropolitan regional sales training data.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Split the data into training and validation
MET_t_train <- MET_t[index(MET_t) < "2017-01-01"]
MET_t_valid <- ___[index(___) >= "___"]

# Use auto.arima() function for metropolitan sales training data
auto.arima(___)
Code bearbeiten und ausführen