1
我有一組用於明智用戶的數據集,一個在線網站的每個會話的點擊模式。我想預測使用馬爾可夫鏈的下一次點擊&其可能性。使用「預測」方法在R中使用「預測」方法時使用點擊流包獲取錯誤
Following is the my Code:
library(clickstream);
cls2<-readClickstreams(file.choose(),sep = ',',header = TRUE);
mc2<-fitMarkovChain(clickstreamList = cls2,order = 2,control = list(optimizer= "linear"));
pattern <- new("Pattern", sequence = c("/clsisGre/PersonalDetailForm.jsp","/clsisGre/PersonalDetail.jsp"), absorbingProbabilities = data.frame(NULL = 0.9, Success = 0.1));
> resultPattern <- predict(mc2, startPattern = pattern, dist = 1);
Error Message is :
Error in if (nextState %in% [email protected]) { :
argument is of length zero
In addition: Warning message:
In max(cp, na.rm = T) : no non-missing arguments to max; returning -Inf
需要幫助來處理此錯誤/異常。 在此先感謝。
您能提供一個可重現的例子嗎? –