rafzamb / sknifedatar

sknifedatar is a package that serves primarily as an extension to the modeltime 📦 ecosystem. In addition to some functionalities of spatial data and visualization.
https://rafzamb.github.io/sknifedatar/
Other
37 stars 11 forks source link

The column date must be ordered by ascending? #17

Open ichsan2895 opened 3 years ago

ichsan2895 commented 3 years ago

Hello, I have tried this tutorial

https://github.com/rafzamb/sknifedatar

I found some bug (or restriction maybe?). Sknifedatar will give wrong test dataset if the column date is not ordered by ascending.

Lets try this ORIGINAL nested_serie = emae_series %>% filter(date < '2020-02-01') %>% nest(nested_column=-sector)

EXPERIMENT nested_serie = emae_series %>% filter(date < '2020-02-01') %>% arrange(desc(date)) %>% nest(nested_column=-sector)

The result is like this: testing

and this forecast

I aware this problem since I tried with another dataset which have random order of date column.

karbartolome commented 3 years ago

Hey @ichsan2895 , Thanks for this comment! This function currently expects the data in ascending order. However, data order validation could be implemented in future developments.