Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error while trying to create recipe #149

Open
beschlemper opened this issue Jul 26, 2023 · 0 comments
Open

Error while trying to create recipe #149

beschlemper opened this issue Jul 26, 2023 · 0 comments

Comments

@beschlemper
Copy link

beschlemper commented Jul 26, 2023

Hello,

I have a simple database with a column of dates and other columns with the variables. I had no problem with ARIMA or Prophet, but I got this error when trying to create the recipe:

`recipe <- recipe(value ~ Ano, training(splits)) %>%

  • step_timeseries_signature(Ano) %>%
  • step_fourier(Ano, period = 1, K = 3) %>%
  • step_dummy(all_nominal())

recipe %>% prep() %>% juice()
A tibble: 198 × 50
Ano value Ano_index.num Ano_year Ano_year.iso Ano_half Ano_quarter Ano_month

1 0001-07-01 856768 -62119958400 1 1 2 3 7
2 0002-07-01 755395 -62088422400 2 2 2 3 7
3 0003-07-01 814879 -62056886400 3 3 2 3 7
4 0004-07-01 708760 -62025264000 4 4 2 3 7
5 0005-07-01 707114 -61993728000 5 5 2 3 7
6 0006-07-01 727197 -61962192000 6 6 2 3 7
7 0007-07-01 802187 -61930656000 7 7 2 3 7
8 0008-07-01 764448 -61899033600 8 8 2 3 7
9 0009-07-01 777312 -61867497600 9 9 2 3 7
10 0010-07-01 797514 -61835961600 10 10 2 3 7
ℹ 188 more rows
ℹ 42 more variables: Ano_month.xts , Ano_day , Ano_hour , Ano_minute ,
Ano_second , Ano_hour12 , Ano_am.pm , Ano_wday , Ano_wday.xts ,
Ano_mday , Ano_qday , Ano_yday , Ano_mweek , Ano_week ,
Ano_week.iso , Ano_week2 , Ano_week3 , Ano_week4 , Ano_mday7 ,
Ano_sin1_K1 , Ano_cos1_K1 , Ano_sin1_K2 , Ano_cos1_K2 ,
Ano_sin1_K3 , Ano_cos1_K3 , Ano_month.lbl_01 , Ano_month.lbl_02 , …
ℹ Use print(n = ...) to see more rows
Warning message:
There were 6 warnings in dplyr::mutate().
The first warning was:
ℹ In argument: Ano_sin1_K1 = timetk::fourier_vec(...).
Caused by warning in as.POSIXct(x) %>% as.numeric() %>% as.integer():
! NAs introduced by coercion to integer range
ℹ Run dplyr::last_dplyr_warnings() to see the 5 remaining warnings. `

The first rows of the database is just like this but it has 210 rows:

ano var1 var2 var3 var4 var5 var6 var7 var8 var9
1 856768 0 213561 0 0 36874 0 0 150408
2 755395 407,691 198381 0 0 38085 0 0 131574
3 814879 353,735 225410 0 0 25944 0 0 178831
4 708760 340,257 211353 1948448 177159,6 29263 2378163 789316,4 141362
5 707114 332,53 196299 1820596 165823,5 46797 2131468 719312,8 187400
6 727197 375,972 194509 2063582 186949,7 37183 2571621 857821,8 191155

I already used the same script for other database, but with this one I keep getting this error.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant