-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
秦谏启奏
大纲
fabletools::accuracy()
在咱们R鄀文艺坊和咱们道家终端杏林「牡蛎」有落差。forecast::Arima(xreg = XXXX)
咱们道家易经、天文历法、廿四节气、十二时辰、算卜与气象学,「兵法廿四篇」之孔明借东风与草船借箭出现错误信息。
与预期出入/代码有误
问题一:fabletools::accuracy()
在咱们R鄀文艺坊和咱们道家终端杏林「牡蛎」有落差如下:
> 外因周期自回归系列 <- bind_rows(list(
+ 外因周期自回归甲 = as_tibble(accuracy(外因周期自回归甲)),
+ 外因周期自回归乙 = as_tibble(accuracy(外因周期自回归乙)),
+ 外因周期自回归丙 = as_tibble(accuracy(外因周期自回归丙)),
+ 外因周期自回归丁 = as_tibble(accuracy(外因周期自回归丁)),
+ 外因周期自回归戊 = as_tibble(accuracy(外因周期自回归戊)),
+ 外因周期自回归己 = as_tibble(accuracy(外因周期自回归己)),
+ 外因周期自回归庾 = as_tibble(accuracy(外因周期自回归庾))), .id = '计数模型')
Error in accuracy(外因周期自回归甲) : 缺少参数"predicted",也没有缺省值
> 外因周期自回归系列
错误: 找不到对象'外因周期自回归系列'
问题二:咱们道家易经、天文历法、廿四节气、十二时辰、算卜与气象学,「兵法廿四篇」之孔明借东风与草船借箭出现错误信息如下:
> 自回归均移模型最优值(tk_xts(总汇[, .(年月日时分, 预测价)]), 外因 = as.matrix(总汇[, .(廿四节气乙, 时辰乙)]))
Using column `年月日时分` for date_var.
Error in auto.arima(样本, D = 季节差分的次数, seasonal = 季节性, :
No suitable ARIMA model found
此外: Warning message:
Non-numeric columns being dropped: 年月日时分
binary.com-interview-question/函数/自回归均移模型最优值.R
Lines 1 to 24 in d66db61
自回归均移模型最优值 <- function(样本, 季节差分的次数 = NULL, 季节性 = '勾', 规律极限值 = 10, 自回归均移模型值 = FALSE, 外因 = NULL) { | |
# 通过设置并迭代筹算自回归均移模型中不同`p,d,q`的规律值,来比较并筛选出最低或最大负数的赤池信息量准则,也就是最优统计模型。 | |
# | |
# 《预测:方法与实践(第三版)》第九章第九节 - 季节性ARIMA模型 | |
# https://otexts.com/fpp3cn/seasonal-arima-cn.html | |
if (!季节性 %in% c('勾', '有', '叉', '冇')) stop('请选择季节性:"勾"或"有"或"是",或者"叉"或"冇"或"否"。') | |
if (季节性 %in% c('勾', '有')) 季节性 <- TRUE | |
if (季节性 %in% c('叉', '冇')) 季节性 <- FALSE | |
# 季节差分的次数,一般上使用到的数值是零到二。 | |
半成品 <- auto.arima(样本, D = 季节差分的次数, seasonal = 季节性, | |
max.order = 规律极限值, xreg = 外因) | |
if (自回归均移模型值 == FALSE) { | |
成果 <- arimaorder(半成品) | |
} else { | |
#https://stats.stackexchange.com/questions/178577/how-to-read-p-d-and-q-of-auto-arima | |
成果 <- 半成品$arma | |
#https://stackoverflow.com/questions/23617662/extract-arima-specificaiton | |
names(成果) <- c('p', 'q', 'P', 'Q', 's', 'd', 'D') | |
成果 %<>% .[c(1, 6, 2, 3, 7, 4, 5)] | |
#(p,d,q) and (P,D,Q) and seasonal period | |
} #范例:`s` seasonal period = 12 表示十二个月 | |
return(成果) |
操作系统信息
$ $ neofetch
##### englianhu@Scibrokes
####### -------------------
##O#O## OS: RedFlag Desktop 11.0 x86_64
####### Host: 23-p080d
########### Kernel: 5.10.0-1-amd64
############# Uptime: 2 days, 6 hours, 1 min
############### Packages: 7971 (dpkg)
################ Shell: bash 5.0.3
################# Resolution: 1920x1080
##################### DE: KDE
##################### WM: KWin
################# Theme: RedFlag Dark [KDE], Breeze [GTK3]
Icons: RedFlag-Themes-Chinrse-Red [KDE], oxygen [GTK3]
Terminal: konsole
CPU: Intel i5-4590T (4) @ 3.000GHz
GPU: NVIDIA GeForce 710M
GPU: Intel HD Graphics
Memory: 14498MiB / 15901MiB
#R> devtools::session_info()$platform
setting value
version R version 4.3.3 (2024-02-29)
os RedFlag Desktop 11.0
system x86_64, linux-gnu
ui X11
language zh_CN:en
collate zh_CN.UTF-8
ctype zh_CN.UTF-8
tz Asia/Shanghai
date 2024-03-29
pandoc NA (via rmarkdown)
#R> Sys.info()
sysname
"Linux"
release
"5.10.0-1-amd64"
version
"#1 SMP Debian 5.10.40-1~rf11u1.2 (2022-09-22)"
nodename
"Scibrokes"
machine
"x86_64"
login
"englianhu"
user
"englianhu"
effective_user
"englianhu"
原本预期结果
> 外因周期自回归系列 <- bind_rows(list(
+ 外因周期自回归甲 = as_tibble(accuracy(外因周期自回归甲)),
+ 外因周期自回归乙 = as_tibble(accuracy(外因周期自回归乙)),
+ 外因周期自回归丙 = as_tibble(accuracy(外因周期自回归丙)),
+ 外因周期自回归丁 = as_tibble(accuracy(外因周期自回归丁)),
+ 外因周期自回归戊 = as_tibble(accuracy(外因周期自回归戊)),
+ 外因周期自回归己 = as_tibble(accuracy(外因周期自回归己)),
+ 外因周期自回归庾 = as_tibble(accuracy(外因周期自回归庾))), .id = '计数模型')
> 外因周期自回归系列
# A tibble: 7 × 8
计数模型 ME RMSE MAE MPE MAPE MASE ACF1
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 外因周期自回归甲 2.44e-14 1.96 1.66 -0.0323 1.53 0.0152 1.00
2 外因周期自回归乙 -4.94e-14 0.801 0.651 -0.00539 0.600 0.00599 1.00
3 外因周期自回归丙 -6.89e-14 1.96 1.66 -0.0323 1.53 0.0152 1.00
4 外因周期自回归丁 -5.33e-14 0.801 0.651 -0.00539 0.600 0.00599 1.00
5 外因周期自回归戊 3.18e-13 1.96 1.66 -0.0323 1.53 0.0152 1.00
6 外因周期自回归己 -2.45e-14 0.799 0.651 -0.00537 0.600 0.00598 1.00
7 外因周期自回归庾 3.66e-14 0.799 0.651 -0.00537 0.600 0.00598 1.00
提案
文献与案例
- auto.arima can't find a suitable model robjhyndman/forecast#102
- No suitable ARIMA model found
- No suitable ARIMA model found error
- Unable to get suitable forecast for ARIMA model in R due to outliers-- attached code for easy replication
- Why I cannot find suitable ARIMA model for the dataset?
- No suitable ARIMA models found
- https://groups.google.com/g/r-help-archive/c/fDDyZxvTIiA/m/76BaDxXGBgAJ?pli=1
- https://stat.ethz.ch/pipermail/r-help/2017-January/444499.html
- https://robjhyndman.com/hyndsight/badarima/index.html
- auto.arima "no suitable ARIMA model found" for measuring dependency between debt and GDP
众卿商议
结论
众方案
- 方案一
- 方案二
- 方案三
最优方案
相关奏折
- 奏折一:中國北京大學贏家ξng黃氏江夏堂「大秦賦•道家李耳老子兼法家李斯篆紀•藝文志」:目前使用🚩🇨🇳🏹🦔中國國產中科紅旗禮逆襲,將目前所有編程語言統一編譯為咱們祖籍中國的黃河文明黃種人母語文言計數編程、篆體、楷體加拼音。 zhongkehongqi#6
- 奏折二: 在
ts
、xts
、matrix
、zoo
格式上使用auto.arima
#8 - 奏折三:中国北京大学赢家ξng黄氏江夏堂「大秦赋」:目前使用🚩🇨🇳🏹中国国产红旗礼逆袭,并且将
REmap
鄀编程语言程序包中文化,以下鄀编程语言函数也开始中文化,日后编程都会使用中文编程。 #7 - 奏折四:Error: forecast::Arima() #910 #6
- 奏折五:「🚩🇨🇳🏹🦔中科紅旗」🎋🎋🎍🐼🎍🎋🎋附有公元前秦人拼音的紅旗輸入法 zhongkehongqi#8
- 奏折六:🚩🔆🏹🌟👊🚀🦔大秦賦:「世襲制道家自然對數進制大秦賦算籌」文言計數編程與杏林業,取代所有西方,包括阿拉伯數字和回教徒語言(包括巫術、貨幣、習俗文化、可蘭經回教刑事法典斷肢法)、基督耶穌(包括耶穌紀年法、貨幣、習俗文化、耶穌受難日、頭戴白假髮冒充老嬤嬤西方司法與數學公式上的洋文) zhongkehongqi#12 (comment)
Metadata
Metadata
Assignees
Labels
No labels