对于depmixs4中的HMM而言,起始值不可行

时间:2018-09-09 20:15:51

标签: r data-science hidden-markov-models

我目前正在尝试使用R的depmixS4软件包生成连续状态的HMM。但是,当我运行fit函数时,遇到以下错误:

Error in em.depmix(object = object, maxit = emcontrol$maxit, tol = emcontrol$tol,  : 
Starting values not feasible; please provide them.

下面的代码示例:

modelData <- sessions[, c("distance", "distance2", "distance3")]
modelData <- na.omit(modelData)
instart <- c(0.33, 0.33, 0.33)
trstart <- c(0.9,0.1,0.1,0.9,0.9,0.1,0.9,0.1,0.9)
HMM <- depmix(list(distance~1, distance2~1,distance3~1),data=modelData,nstates=3,family=list(gaussian(),gaussian(), gaussian()), instart = instart, trstart = trstart)
HMMfit<-fit(HMM, verbose = FALSE)

以下也是三列中某些值的样本。有什么线索吗?任何指针将不胜感激。

Data Sample

0 个答案:

没有答案