I tried to refer to below links to use data.table
package to calculate mape
,smape
,mse
,rmse
, its working fine with below codes when run in chunk but become error when knit2html
. Somebody shade me a light?
## https://tysonbarrett.com/jekyll/update/2019/10/06/datatable_memory
## http://brooksandrew.github.io/simpleblog/articles/advanced-data-table
require('DescTools')
require('data.table')
setorder(seasonal_m1, index)
open.accr <- seasonal_m1[, {
open = open
open.Point.Forecast = open.Point.Forecast
.SD[, .(.N, open.mape = MAPE(open, open.Point.Forecast),
open.smape = SMAPE(open, open.Point.Forecast),
open.mse = MSE(open, open.Point.Forecast),
open.rmse = RMSE(open, open.Point.Forecast)),
by={index=as_date(index)}]},
by=.(Model, Period)]
Error :
Error in `[.tbl_df`(seasonal_m1, , { :
object 'open.Point.Forecast' not found
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> [ -> [.tbl_df
Execution halted
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…