diff --git a/DESCRIPTION b/DESCRIPTION index de0f58dc..eaf30d1e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: finnts Title: Microsoft Finance Time Series Forecasting Framework -Version: 0.4.0 +Version: 0.4.0.9000 Authors@R: c(person(given = "Mike", family = "Tokic", diff --git a/NEWS.md b/NEWS.md index 7745b630..0dbe3e6c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# finnts 0.4.0.9000 (DEVELOPMENT VERSION) + +## Bug Fixes + +- Issue when writing extremely large forecasts to disk + # finnts 0.4.0 ## Improvements diff --git a/R/train_models.R b/R/train_models.R index 230bc934..778ce7ea 100644 --- a/R/train_models.R +++ b/R/train_models.R @@ -637,6 +637,10 @@ train_models <- function(run_info, tidyr::unite(col = "Model_ID", c("Model_Name", "Model_Type", "Recipe_ID"), sep = "--", remove = FALSE) %>% dplyr::group_by(Combo_ID, Model_ID, Train_Test_ID) %>% dplyr::mutate(Horizon = dplyr::row_number()) %>% + dplyr::ungroup() %>% + dplyr::rowwise() %>% + dplyr::mutate(Forecast = ifelse(Forecast > 1000000000000000, 1000000000000000, Forecast)) %>% + dplyr::mutate(Forecast = ifelse(Forecast < -1000000000000000, -1000000000000000, Forecast)) %>% dplyr::ungroup() if (unique(final_forecast_tbl$Combo_ID) == "All-Data") {