xg_data <- ts_table %>%
left_join (feature_extra, by = c ("order_date" = "ds" )) %>%
select (- c (day_qty, order_date, diff1, rollmean))
glimpse (xg_data)
## Rows: 1,206
## Columns: 42
## $ log_qty <dbl> 6.841615, 7.023759, 9.094031, 9.872203, 10.168464…
## $ year <dbl> 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2…
## $ month <dbl> 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9…
## $ day <int> 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1…
## $ quarter <int> 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3…
## $ workday <int> 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1…
## $ trend <dbl> 9.086266, 9.088403, 9.090541, 9.092679, 9.094816,…
## $ additive_terms <dbl> 0.3440177, 0.1867913, 0.2487844, 0.2715036, 0.311…
## $ additive_terms_lower <dbl> 0.3440177, 0.1867913, 0.2487844, 0.2715036, 0.311…
## $ additive_terms_upper <dbl> 0.3440177, 0.1867913, 0.2487844, 0.2715036, 0.311…
## $ holidays <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ holidays_lower <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ holidays_upper <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ weekly <dbl> 0.083728674, -0.070732250, -0.004959013, 0.022206…
## $ weekly_lower <dbl> 0.083728674, -0.070732250, -0.004959013, 0.022206…
## $ weekly_upper <dbl> 0.083728674, -0.070732250, -0.004959013, 0.022206…
## $ yearly <dbl> 0.2602891, 0.2575236, 0.2537435, 0.2492970, 0.244…
## $ yearly_lower <dbl> 0.2602891, 0.2575236, 0.2537435, 0.2492970, 0.244…
## $ yearly_upper <dbl> 0.2602891, 0.2575236, 0.2537435, 0.2492970, 0.244…
## $ 春节 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 春节_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 春节_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 端午节 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 端午节_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 端午节_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 国庆节 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 国庆节_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 国庆节_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 劳动节 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 劳动节_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 劳动节_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 清明节 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 清明节_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 清明节_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 元旦 <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 元旦_lower <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 元旦_upper <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0…
## $ 中秋节 <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ 中秋节_lower <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ 中秋节_upper <dbl> 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000…
## $ trend_lower <dbl> 9.086266, 9.088403, 9.090541, 9.092679, 9.094816,…
## $ trend_upper <dbl> 9.086266, 9.088403, 9.090541, 9.092679, 9.094816,…