-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need Help #3
Comments
you probably have holes in your input time series.
K
…On Wed, May 8, 2019 at 7:54 AM MohamedaliS ***@***.***> wrote:
I am using a "10 years" monthly time-series data to run this code. But
getting "Error in
data.frame(c(10^as.numeric(-colMeans(bsts.model$one.step.prediction.errors[-(1:burn),
:
arguments imply differing number of rows: 144, 120"
d2 <- data.frame(
# fitted values and predictions
c(10^as.numeric(-colMeans(bsts.model$one.step.prediction.errors[-(1:burn),])+y),
10^as.numeric(p$mean)),
# actual data and dates
as.numeric(AirPassengers),
as.Date(time(AirPassengers)))
names(d2) <- c("Fitted", "Actual", "Date")
Please help me to sort out this error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACNKU5CQA63LOCCCTRJ6ZC3PULSRLANCNFSM4HLSPPLQ>
.
|
I have actually encountered same issue as @MohamedaliS and couldn't figure out why. @klarsen1 Can you specify what is "have holes" in time series? Also, the fact that the traceback error suggests its off by exactly the "horizon = xx" (in my case) makes me wonder what went wrong.... Thanks so much in advance! |
Yes. This typically happens if you don't have data for every period (day,
week, month, etc). This creates all sorts of havoc when calculating model
accuracy, etc.
Also, when running time series models it's generally a bad idea to skip
periods – whether it's STL or ARIMA.
Also, if you data is daily, you cannot have two or more observations for a
single day. Then your data is not daily.
Kim
…On Fri, Feb 28, 2020 at 12:37 PM Jessie Cui ***@***.***> wrote:
I have actually encountered same issue as @MohamedaliS
<https://github.com/MohamedaliS> and couldn't figure out why.
@klarsen1 <https://github.com/klarsen1> Can you specify what is "have
holes" in time series?
For example, for my daily time-series data, does that mean I don't have
data for each single day? Do I have to have a data entry for each day? What
if I have multiple data entries in a day?
Also, the fact that the traceback error suggests its off by exactly the
"horizon = xx" (in my case) makes me wonder what went wrong....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=ACNKU5BIIIXCKLJIXADPBEDRFFY2LA5CNFSM4HLSPPL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENKCNKI#issuecomment-592717481>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNKU5B62XKQ7FH43O7ITPLRFFY2LANCNFSM4HLSPPLQ>
.
|
Thanks so much @klarsen1 ! I was able to fix the issue from your recommendation. I have tried your code on my own set of data, and have encountered another issue - the burn out rate is very high (e.g. with 500 MCMC iterations, bsts suggested a burn out number of 497), which I think could be the reason why my MAPE is as high as 70%+. FYI. I have 3 years of daily data (I aggregated by day so that I don't have multiple entries in a same day). My holdout period is 30 days. Just wondering if you have any insights as to whether there are any other way to improve model accuracy? Best, |
I’d say play with the level term standard error. It’s described in the
vignette.
K
…On Mon, Mar 2, 2020 at 11:51 AM Jessie Cui ***@***.***> wrote:
Yes. This typically happens if you don't have data for every period (day,
week, month, etc). This creates all sorts of havoc when calculating model
accuracy, etc. Also, when running time series models it's generally a bad
idea to skip periods – whether it's STL or ARIMA. Also, if you data is
daily, you cannot have two or more observations for a single day. Then your
data is not daily. Kim
… <#m_3917971288622514075_>
On Fri, Feb 28, 2020 at 12:37 PM Jessie Cui *@*.***> wrote: I have
actually encountered same issue as @MohamedaliS
<https://github.com/MohamedaliS> https://github.com/MohamedaliS and
couldn't figure out why. @klarsen1 <https://github.com/klarsen1>
https://github.com/klarsen1 Can you specify what is "have holes" in time
series? For example, for my daily time-series data, does that mean I don't
have data for each single day? Do I have to have a data entry for each day?
What if I have multiple data entries in a day? Also, the fact that the
traceback error suggests its off by exactly the "horizon = xx" (in my case)
makes me wonder what went wrong.... — You are receiving this because you
were mentioned. Reply to this email directly, view it on GitHub <#3
<#3>?email_source=notifications&email_token=ACNKU5BIIIXCKLJIXADPBEDRFFY2LA5CNFSM4HLSPPL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENKCNKI#issuecomment-592717481>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACNKU5B62XKQ7FH43O7ITPLRFFY2LANCNFSM4HLSPPLQ
.
Thanks so much Kim! I was able to fix the issue from your recommendation.
I have tried your code on my own set of data, and have encountered another
issue - the burn out rate is very high (e.g. with 500 MCMC iterations, bsts
suggested a burn out number of 197), which I think could be the reason why
my MAPE is as high as 70%+.
FYI. I have 3 years of daily data (I aggregated by day so that I don't
have multiple entries in a same day). My holdout period is 30 days. Just
wondering if you have any insights as to whether there are any other way to
improve model accuracy?
Best,
JC
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=ACNKU5GNP7CRIB3DJTNHYRLRFQE4TA5CNFSM4HLSPPL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQWN2Q#issuecomment-593585898>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNKU5AYGH7YPNTJIC5X3JDRFQE4TANCNFSM4HLSPPLQ>
.
|
I am using a "10 years" monthly time-series data to run this code. But getting "Error in data.frame(c(10^as.numeric(-colMeans(bsts.model$one.step.prediction.errors[-(1:burn), :
arguments imply differing number of rows: 144, 120"
d2 <- data.frame(
names(d2) <- c("Fitted", "Actual", "Date")
Please help me to sort out this error.
The text was updated successfully, but these errors were encountered: