config-i1 / adam Goto Github PK
View Code? Open in Web Editor NEWTime Series Analysis and Forecasting with ADAM
License: Other
Time Series Analysis and Forecasting with ADAM
License: Other
adam/Chapters/01-Introduction.Rmd
Line 30 in 91b1200
I hope this is an appropriate question here (I just realized after posting that you might not be involved with the modeltime implementation of your adam model). I'm just starting to learn how to do time series forecasting in the tidymodel framework. Using ADAM from the smooth package, I can do the code below to save nsims (e.g. 1000) forecasts of 10 years of data for further analysis:
library(smooth)
data(BJsales)
adamETSBJ <- adam(BJsales, "AAN")
OneKForecastsOf10Years <- forecast(adamETSBJ,h=10, interval="simulated",scenarios=TRUE,nsim=1000)
plot(OneKForecastsOf10Years$scenarios[,1], ylab="Sales",ylim=range(OneKForecastsOf10Years$scenarios), xlab="Horizon",col=rgb(0.8,0.8,0.8,0.4))
Plot all the generated lines
for(i in 2:1000){
lines(OneKForecastsOf10Years$scenarios[,i],col=rgb(0.8,0.8,0.8,0.4))
}
To do this in a tidymodel framework, I do:
library(modeltime)
library(tidymodels)
BJsales.tidy <- tibble(BJsales) %>% mutate(FakeDate = seq(as.Date('2020-01-01'),by='day',length.out = 150))
model_spec <- adam_reg(ets_model = "AAN") %>%
set_engine("adam")
model_fit <- model_spec %>%
fit(BJsales ~ FakeDate, data = BJsales.tidy)
models_tbl <- modeltime_table(
model_fit
)
But I can only seem to extract the summary stats for the forecasts, not the simulation paths
TidyForecasts <- models_tbl %>%
modeltime_forecast(
h=10,
actual_data = BJsales.tidy,
interval="simulated",scenarios=TRUE,nsims=1000
)
Any suggestions on what I'm missing? Thanks!
Hi!
I'm reading the book. Does this question follow the concept described in the book and comes to the right conclusion/question?...
business-science/modeltime#162
They don't work in pdf. Substitute "$" by "\begin{equation}$ in the table.
adam/Chapters/02-Forecasting-Evaluation.Rmd
Lines 569 to 571 in b7df504
adam/Chapters/01-Introduction.Rmd
Line 105 in 2b9d64e
adam/Chapters/01-Introduction.Rmd
Line 74 in a9430c9
adam/Chapters/02-Forecasting-Evaluation.Rmd
Line 251 in 0cdd9f6
adam/Chapters/02-Forecasting-Evaluation.Rmd
Line 329 in 59c00c5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.