Subject: Issue with accuracy() function from fpp3 package
Message:
Hello,
I'm encountering an issue with the accuracy() function from the fpp3 package. My forecast object is of class fbl_ts, but when I try to use accuracy(tslm_forecast, data), I get an error saying "No accuracy method found for an object of class fbl_ts." I have confirmed that my package version is up to date (version 0.5).
Can someone please help me troubleshoot this issue? Is there something I might be missing or any known workarounds for this problem?
accuracy(beer_fc, recent_production)
error message: Error in accuracy.default(beer_fc, recent_production) :
No accuracy method found for an object of class fbl_tsNo accuracy method found for an object of class tbl_tsNo accuracy method found for an object of class tbl_dfNo accuracy method found for an object of class tblNo accuracy method found for an object of class data.frame
The issue here is that you are loading the forecast package, which you do not need. It uses the generics::accuracy() function, while the version of fabletools you are using has its own accuracy generic. The problem won't occur after the next update to fabletools when it will use the same generic as the forecast package. In the meantime, either don't load the forecast package, or explictly use fabletools::accuracy().