GithubHelp home page GithubHelp logo

Comments (6)

ellisp avatar ellisp commented on July 20, 2024 1

Thanks for the reproducible examples. Earthquake permitting, I should be able to fix them over the next week. I may need a different approach to seasonality with high frequency though, as I don't think 366 dummy variables are likely to be useful (although it could be one of several options).

from forecastxgb-r-package.

ellisp avatar ellisp commented on July 20, 2024

They might be related to #15 which is quite a recent fix. Were you working with a time series with frequency = 1? If so, if you reinstall the latest version it might fix it.

from forecastxgb-r-package.

mhnierhoff avatar mhnierhoff commented on July 20, 2024

Thanks for the quick reply. The time series for problem 1 is frequency = 365.25 (daily data) and for the second one it is 12 (monthly data).

from forecastxgb-r-package.

ellisp avatar ellisp commented on July 20, 2024

hmm, ok. I'm not surprised there's bugs. Could you get me a reproducible example, or at least the code that does it? Could do me a favour and devtools::install_github() the latest version (unless you've updated in the past four days), it's just possible the frequency=12 problem would be fixed by that.

This looks like two separate problems. I haven't thought through what to do when frequency is not an integer so that one doesn't surprise me, but the monthly one should be fine.

What's a good daily data source for testing?

from forecastxgb-r-package.

mhnierhoff avatar mhnierhoff commented on July 20, 2024

I've just updated the package and there is no effect. But I think I found the problem. There seems to be still a problem with the frequency settings.

Works:

bla_1 <- ts(runif(35, min = 5000, max = 10000))
(or: bla_1 <- ts(runif(35, min = 5000, max = 10000), start = c(2013,12)))

bla_1_XGB_model <- xgbts(y = bla_1)

Stopping. Best iteration: 25

bla_2 <- ts(runif(1076, min = 5000, max = 10000), start = c(2013, yday("2013-12-03")))

bla_2_XGB_model <- xgbts(y = bla_2)

Stopping. Best iteration: 13


Don't works:

bla_1 <- ts(runif(35, min = 5000, max = 10000), start = c(2013,12), frequency = 12)

Error in x[, maxlag + 2:f] <- seasons :
number of items to replace is not a multiple of replacement length
In addition: Warning message:
In xgbts(y = bla_1) :
y is too short for cross-validation. Will validate on the most recent 20 per cent instead.

bla_2 <- ts(runif(1076, min = 5000, max = 10000), start = c(2013, yday("2013-12-03")), 
            frequency = 365.25)

bla_2_XGB_model <- xgbts(y = bla_2)

Error in x[, maxlag + 1] <- time(y2) :
number of items to replace is not a multiple of replacement length

from forecastxgb-r-package.

ellisp avatar ellisp commented on July 20, 2024

I'm going to close this. Thanks for bringing it up, it's led to a fruitful line of work.

The problem with the monthly series should be fixed - the short series should at least run, and there is now a better option for these short series (and maybe better full stop) of setting seas_method = 'decompose' which should give better results (i think).

The problem with the daily series is now a duplicate of the content of #22 and #26.

from forecastxgb-r-package.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.