Giter Club home page Giter Club logo

Comments (7)

dashaub avatar dashaub commented on June 19, 2024

@mbanco This runs find on my computer

 trainSet <- beaver1[1:100, ]
 testSet <- beaver1[-(1:100), ]
 trainXreg <- data.frame(trainSet$activ, trainSet$time)
 beaverhm <- hybridModel(ts(trainSet$temp, f = 6),
                         models = "ans",
                         a.args = list(xreg = trainXreg),
                         n.args = list(xreg = trainXreg),
                         s.args = list(xreg = trainXreg, method = "arima"))
Fitting the auto.arima model
Fitting the nnetar model
Fitting the stlm model

Which version of R and "forecastHybrid" are you running? Could you paste the output of sessionInfo() and installed.packages()["forecastHybrid", ]?

from forecasthybrid.

mbanco avatar mbanco commented on June 19, 2024

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252
[4] LC_NUMERIC=C LC_TIME=Spanish_Spain.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_0.12.19 urca_1.3-0 pillar_1.3.0 compiler_3.5.1 plyr_1.8.4 bindr_0.1.1
[7] iterators_1.0.10 tseries_0.10-45 tools_3.5.1 xts_0.11-1 nlme_3.1-137 tibble_1.4.2
[13] gtable_0.2.0 lattice_0.20-35 pkgconfig_2.0.2 rlang_0.3.0.1 foreach_1.4.4 rstudioapi_0.8
[19] curl_3.2 yaml_2.2.0 parallel_3.5.1 bindrcpp_0.2.2 dplyr_0.7.7 lmtest_0.9-36
[25] grid_3.5.1 nnet_7.3-12 tidyselect_0.2.5 glue_1.3.0 R6_2.3.0 ggplot2_3.1.0
[31] purrr_0.2.5 TTR_0.23-4 magrittr_1.5 codetools_0.2-15 scales_1.0.0 assertthat_0.2.0
[37] quantmod_0.4-13 timeDate_3043.102 colorspace_1.3-2 fracdiff_1.4-2 quadprog_1.5-5 doParallel_1.0.14
[43] lazyeval_0.2.1 munsell_0.5.0 crayon_1.3.4 zoo_1.8-4

installed.packages()["forecastHybrid", ]
Package
"forecastHybrid"
LibPath
"C:/R/library"
Version
"3.0.14"
Priority
NA
Depends
"R (>= 3.1.1), forecast (>= 8.1),"
Imports
"doParallel (>= 1.0.10), foreach (>= 1.4.3), ggplot2 (>=\n2.2.0), zoo (>= 1.7)"
LinkingTo
NA
Suggests
"GMDH, knitr, rmarkdown, roxygen2, testthat"
Enhances
NA
License
"GPL-3"
License_is_FOSS
NA
License_restricts_use
NA
OS_type
NA
MD5sum
NA
NeedsCompilation
"no"
Built
"3.5.1"

from forecasthybrid.

dashaub avatar dashaub commented on June 19, 2024

That all looks normal. Do the base models run correctly on your machine?

auto.arima(ts(trainSet$temp, f = 6), xreg = trainXreg)

and

nnetar(ts(trainSet$temp, f = 6), xreg = trainXreg)

and

stlm(ts(trainSet$temp, f = 6), xreg = trainXreg, method = "arima")

If all this works, can you try running hybridModel on another machine? I've been able to run this fine on two machines without issue, so I'm not sure what it is.

from forecasthybrid.

mbanco avatar mbanco commented on June 19, 2024

I think that problem happens because I use the forecast version 8.5 package.

Thanks

from forecasthybrid.

dashaub avatar dashaub commented on June 19, 2024

@mbanco Thanks for reporting this. Indeed you're correct that something has changed in the yet-unreleased "forecast" 8.5 that requires the xreg to be a matrix instead of a data.frame. I've gone ahead and updated the vignette, documentation, and tests to reflect how "forecast" behaves, so now this should work:

trainSet <- beaver1[1:100, ] 
testSet <- beaver1[-(1:100), ]
trainXreg <- as.matrix(data.frame(trainSet$activ, trainSet$time))
beaverhm <- hybridModel(ts(trainSet$temp, f = 6),
                        models = "aenst",
                        a.args = list(xreg = trainXreg),
                        n.args = list(xreg = trainXreg),
                        s.args = list(xreg = trainXreg, method = "arima"))

This work is in the matrix_xreg branch, and I'll keep it there until the "forecast" releases and update. I hope to add a few more unit tests around this as well.

from forecasthybrid.

mbanco avatar mbanco commented on June 19, 2024

@dashaub Thanks, works fine!

from forecasthybrid.

dashaub avatar dashaub commented on June 19, 2024

Fixes in #87

from forecasthybrid.

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.