modeltime: Time series forecasting in R with tidymodels

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 61

  • @siavashk100
    @siavashk100 10 дней назад

    Thank you for this tutorial.
    Is there any way to adjust some parameters of auto_arima (e.g. max.p, or max.q) in this method?

  • @jgeise
    @jgeise 3 года назад +1

    Great package for forecasting. Thanks, Matt!

  • @88fjoe
    @88fjoe 3 года назад +1

    Great package and tutorials!

  • @mohammadsaifuddin9459
    @mohammadsaifuddin9459 2 года назад +1

    Love this :)

  • @jossrdgz8
    @jossrdgz8 3 года назад +2

    Great tutorial I am gonna register for the course! One question I usually deal with data that is reported yearly how can I define the model to use yearly step data and not monthly?

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Yearly data that has one timestamp per year is fine. The index numeric feature will define a trend feature for the model. You can also add other features like splines to help. I teach these in my time series course.

  • @wilsoncarrillo8623
    @wilsoncarrillo8623 Год назад

    Hi...great work! can i do it with irregular time series?

  • @PA_hunter
    @PA_hunter 2 года назад +2

    Awesome package. That interactive plot is also really cool! I’m not too familiar with time series…how would you handle forecasting customers for the year ahead when working with five years of data and COVID as a separate phenomenon over the last two years only?

    • @BusinessScience
      @BusinessScience  2 года назад

      Awesome glad you are loving modeltime and interested on using it to forecast with outliers present like COVID. I actually did a full training on this with 8 airlines showing how to forecast passenger load. It’s in a paid program called Learning Labs Pro. It was Learning Lab 60. university.business-science.io/p/learning-labs-pro
      I’ll check to see if I opened that one up.

    • @BusinessScience
      @BusinessScience  2 года назад

      I actually opened that lesson up. You can check it out here: ruclips.net/video/QhuoCKhQ5fg/видео.html

    • @PA_hunter
      @PA_hunter 2 года назад

      @@BusinessScience awesome thanks!

  • @517127
    @517127 Год назад +1

    Since modeltime extend tidymodels, can i use explainable methods used in tidymodels like vip, DALEX and DALEXtra? It would be amazing explain the forecast with modelStudio

    • @BusinessScience
      @BusinessScience  Год назад

      Yes you can! That’s the beauty of this whole system. Anything you can do with a tidymodel you can do with modeltime. So explainable models are easy to do with vip or DALEX.

  • @rafaelbaptista7337
    @rafaelbaptista7337 2 года назад

    Great tutorial. Please, how can I add regressor? I need to include a xreg to help improve the prediction.

    • @BusinessScience
      @BusinessScience  2 года назад +1

      You can add xregs into the data and then model the data using recipes R package for preprocessing and parsnip / workflows to create the model(s)

  • @anitahaique
    @anitahaique Год назад

    Hi, Why aren't forecast intervals getting wider as we move further into the future? Thanks

  • @jerrickren3802
    @jerrickren3802 Год назад

    when I try to run'modeltime' Error shoed as: package or namespace load failed for ‘modeltime’:
    .onLoad failed in loadNamespace() for 'modeltime', details:
    call: check_model_doesnt_exist(model)
    error: Model `prophet_reg` already exists. Could U pls tell me how to resolve it?

  • @sebastiansantiago3783
    @sebastiansantiago3783 3 года назад +1

    Doing the proper code, what we do grid search for the parameters?

    • @BusinessScience
      @BusinessScience  3 года назад +1

      We just added a new tutorial on Hyperparameter Tuning. I’d start here. It also covers parallel processing and the new tidymodels workflowsets integration. business-science.github.io/modeltime/articles/parallel-processing.html

    • @sebastiansantiago3783
      @sebastiansantiago3783 3 года назад

      @@BusinessScience hi…last question jaja
      I was reading about see we can use prophet with Modeltime and also is a boosted version, now Facebook deployed Neural Prophet ( I also see we have N Beats and Deep AR), is this something we as an user can include within this framework or this would be included on a newer version of Modeltime 🤩
      Thanks and Regards

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Soon!

  • @maxirojo7829
    @maxirojo7829 2 года назад

    Hello excellent video!. At minute 8:50, how do I put the same colors on the legend labels? Thank you

    • @BusinessScience
      @BusinessScience  2 года назад +1

      Thanks for the kind comments. I see that the colors match but there is gray behind the color because we have a gray ribbon for the confidence intervals. To make the colors more clear you can turn off the confidence intervals. Check out the plot_modeltime_forecast() function.

    • @maxirojo7829
      @maxirojo7829 2 года назад

      @@BusinessScience Thanks for the prompt response! The video is really excellent and it has been very useful to me. I am working with a time series of savings account deposits with daily data with only business days (between 21 and 22 data per month). The series has a positive trend and local lows on the first business day and local highs on the last business day (day 21 or 22). How should I calibrate seasonality inside prophet_reg? Really thank you very much

  • @cgonzalezcon
    @cgonzalezcon 9 месяцев назад

    Great video, thanks for the easy to follow explanations. I have been getting an error once I get to the ARIMA model: Error in `check_case_weights()`:
    ! 'case_weights' should be a single numeric vector of class 'hardhat_case_weights'. Do you know what it means?

    • @BusinessScience
      @BusinessScience  8 месяцев назад

      Thanks! I’m not familiar with that error

  • @patuko5304
    @patuko5304 2 года назад

    Hi! Please could you review the time_series_split function? There is something wrong on how the function is making the split (asses property not really taking dates into account and maybe using sample count?). If your dataset samples don't have daily registers the test date range will not be as stated. Have mapped dividing by items and got diferent test date ranges for each item.
    Anyway, thank you a lot for your work and teachings!

    • @BusinessScience
      @BusinessScience  2 года назад +1

      Can you please file a reproducible github issue at the timetk github website? This is the proper method for handling bug and feature requests.

  • @Ottozone1
    @Ottozone1 3 года назад

    On the plot_modeltime_forecast output, it is a bit difficult to see the colors on the legend. Is there parameter to change in make the color larger or standout more on the legend?

    • @BusinessScience
      @BusinessScience  3 года назад

      You can render as a ggplot object using .interactive = FALSE. Then adjust the plot to your liking. You can convert to interactive using ggplotly(). If you'd like to learn more, I have a full course on time series: university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting/

  • @NotMuchHere
    @NotMuchHere Год назад

    greetings, Is there a way to see the raw data for the predictions. The variables show model information, not the raw projected data ..

    • @BusinessScience
      @BusinessScience  Год назад

      Yes it’s output in modeltime_forecast()

    • @NotMuchHere
      @NotMuchHere Год назад

      @@BusinessScience Thanks, that got me started. I was able to see the projections. A bit odd projections were at the beginning of the date range ... at the end of the tibble. (You have given me something interesting to play around with (figure out -- F1). Of course I changed the source data so that part is on me ... (I am going to keep trying)

  • @PAULSHOWTO3
    @PAULSHOWTO3 2 года назад

    Using date_var: Date
    Error in `dplyr::group_by()`:
    ! Column `Date` (index) can't be a grouping variable for a tsibble.
    i Did you mean `index_by()`?
    i got this error when i terminate R session please help

    • @BusinessScience
      @BusinessScience  2 года назад

      You are using a tsibble. Try converting to tibble.

  • @ericmai6798
    @ericmai6798 2 года назад

    How well do these packages work with annual data rather than daily/monthly/quarterly?

    • @BusinessScience
      @BusinessScience  2 года назад

      Very good. And you can do any type of algorithms from ARIMA to xgboost.

  • @emiliostar5
    @emiliostar5 2 года назад

    Hi, does this support Neural Net based time series and Bayesian Structural Time Series?

    • @BusinessScience
      @BusinessScience  2 года назад +1

      Yes and yes. See modeltime.gluonts for deep learning. One of my students created bayesmodels package for Bayesian structural time series.

  • @aparnasnayanar2621
    @aparnasnayanar2621 Год назад

    I am using the nbeats model for time series forecasting. Everything looks fine except am getting some rlang error : can’t find nbeats environment. When clear the state and reattach the cluster in databricks , the error goes. Can someone suggest how the error can be fixed

    • @BusinessScience
      @BusinessScience  Год назад

      I’d start with the documentation. We have comprehensive installation and environment setup. Make sure you are using the development version business-science.github.io/modeltime.gluonts/

    • @aparnasnayanar2621
      @aparnasnayanar2621 Год назад

      I have used the Dev version. But now the error is related to a dependency package ‘htmltools’. This is conflicting with my existing sparklyr package . I think the sparklyr needs a htmltools version higher

  • @PAULSHOWTO3
    @PAULSHOWTO3 2 года назад

    how to check the MAPE and RMSE of forecast?

    • @BusinessScience
      @BusinessScience  2 года назад

      Run modeltime_accuracy() on a calibrated modeltime table

  • @gauravmodi12
    @gauravmodi12 2 года назад +1

    can we do BSTS here ?

    • @BusinessScience
      @BusinessScience  2 года назад

      Yep - there is an R package called bayesmodels that includes BSTS

  • @Lirim_K
    @Lirim_K 2 года назад +1

    Never really understood the use of time series forecasting that merely replicates seasonal patterns. I could have come up with those forecasts by my self just by looking at the series previous months. So many advanced algorithms yet they do not perform better than a human.

  • @elnarasryva6822
    @elnarasryva6822 3 года назад

    Why you chose DTEDAY AND CNT ? In my data how can I choose columns

    • @BusinessScience
      @BusinessScience  3 года назад

      Good question, these are the time stamp and target value columns, respectively.

  • @hansmeiser6078
    @hansmeiser6078 3 года назад +1

    Nice intro, but as always, no param tunings- not the whole Enchilada.

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Just an intro. Check out the articles on our modeltime website
      Hyperparameter Tuning: business-science.github.io/modeltime/articles/parallel-processing.html
      Panel Data: business-science.github.io/modeltime/articles/modeling-panel-data.html
      Autoregressive Forecasting business-science.github.io/modeltime/articles/recursive-forecasting.html

  • @sebastiansantiago3783
    @sebastiansantiago3783 3 года назад +1

    Hi Matt, love all the material you posted and I'm enrolled on your Time Series Forecast course.
    Quick question, does your package works with Fable (upgrade from Forecast Package)
    ruclips.net/video/6v3_AsbhqrE/видео.html
    Or a totally different thing ? The reason I'm asking is because to my understanding Fable is Forecast on roids lol, and combining your package and this makes sense :)

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Hey, awesome to hear you are in my Time Series Course. You will love it.

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Q1: Fable - Modeltime does not currently work with Fable. We like fable for easily iterating arima and other classical models.
      We developed Modeltime for bringing the Tidymodels ecosystem to forecasting so we can replicate solutions to problems like the M5 Competition. In M5, XGBOOST made panel models that forecast all time series at once. It’s a really powerful idea. We also do local models. And the workflow is designed for rapidly testing and experimentation with many models.

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Q2: Fable is the tidyverse version of forecast R package. Modeltime is tidymodels applied to forecasting. Both are insanely powerful depending on your needs. Our machine learning and deep learning ecosystem is quite extensive. And we have some more innovations coming! 😊

    • @sebastiansantiago3783
      @sebastiansantiago3783 3 года назад +1

      @@BusinessScience thank you for taking the time for responding which such detail…seems like I will be focusing more on learning Modeltime for now…can wait for what is coming 😱

  • @djangoworldwide7925
    @djangoworldwide7925 3 года назад

    This is not quite a tutorial. That's crazy. As a first year stat student I kinda didn't understand any of the mL functions..

    • @BusinessScience
      @BusinessScience  3 года назад +1

      Understanding time series can be complex… but if you want to go deeper, I offer a very powerful course.