是否有任何 R 包支持使用多个观察序列拟合 HMM?据我所知,depmixS4 不支持此功能
depmixS4 - 如何适应 HMM 使用多个观察序列
数据挖掘
r
马尔可夫隐藏模型
2022-03-04 03:25:04
1个回答
不,depmixS4 支持包含多个外部变量来预测基础时间序列。在这种情况下,转移矩阵是所有其他外部变量的函数。它也在 depmix S4 小插图中给出。-
一个有用的开始材料 -
https://machinelearningstories.blogspot.com/2017/02/hidden-markov-model-session-1.html &
http://machinelearningstories.blogspot.in/2017_03_01_archive.html
R代码片段-
所需库
库(depmixS4)
数据加载——
医师处方数据 <-c(12,16,45,45,56,67,78,98,120,124,156)
模型执行——
HMM_model <- depmixS4::depmix(physician_prescition_data~1, nstates = 2,ntimes=length(physician_prescition_data))
模型拟合
HMM_fm <- 拟合(HMM_model)
转换概率-
HMM_fm@transition
后验状态——
后验(HMM_fm)图(ts(后验(HMM_fm)[,1]))
排放概率-
HMM_fm@response
其它你可能感兴趣的问题