[英]cSPADE data mining in R using arulesSequences - Error while converting to “transactions” format
[英]CSPADE method in R throws ERROR: no slot of name “transactionInfo” for this object of class “transactions”
當對CSPADE算法運行以下方法時(在事務中查找關聯規則),R出現錯誤:
x <- read_baskets(con = system.file("misc", "zaki.txt", package = "arulesSequences"), info = c("sequenceID","eventID","SIZE"))
s1 <- cspade(x, parameter = list(support = 0.4), control = list(verbose = TRUE))
parameter specification:
support : 0.4
maxsize : 10
maxlen : 10
algorithmic control:
bfstype : FALSE
verbose : TRUE
summary : FALSE
tidLists : FALSE
preprocessing ...
Error in typeof(x) :
no slot of name "transactionInfo" for this object of class "transactions"
“ x”是一個事務對象,已成功創建,但是由於某種原因cspade方法不起作用(即使在其文檔中提供的經典數據集上也是如此)
可能為時已晚,但對於下一個讀者來說,我認為此錯誤是在軟件包升級后出現的。
只需添加:
attributes(x)$transactionInfo <- x@itemsetInfo
用read_baskets()創建x之后
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.