简体   繁体   English

调用 rCBA::fpgrowth 时出错:带有签名 (DDI) 的方法 fpgrowth[[Ljava/lang/String; 未找到

[英]Error calling rCBA::fpgrowth: method fpgrowth with signature (DDI)[[Ljava/lang/String; not found

I wrote the R code below to mine with the FP-Growth algorithm:我写了下面的 R 代码来使用 FP-Growth 算法进行挖矿:

fpgabdata <- read.csv('../Agen Biasa.csv', header = FALSE)    
train <- sapply(fpgabdata, as.factor)    
train <- data.frame(train, check.names = TRUE)    
txns <- as(train,"transactions")    
abrulesfpg = rCBA::fpgrowth(txns, support = 0.25, confidence = 0.5, maxLength = 10, consequent = NULL, verbose = TRUE, parallel = TRUE)

But I get the following error:但我收到以下错误:

Error in .jcall(jPruning, "[[Ljava/lang/String;", "fpgrowth", support,  :     
  method fpgrowth with signature (DDI)[[Ljava/lang/String; not found    

These are my data:这些是我的数据:

我使用的数据

The reason you are seeing this error is that the current implementation of the FP-growth algorithm in rCBA requires that you specify a value for the consequent (right hand side).您看到此错误的原因是 rCBA 中 FP-growth 算法的当前实现要求您为结果(右侧)指定一个值。

For example, the following should work, assuming you have sensible thresholds for support and confidence:例如,假设您对支持和信心有合理的阈值,以下应该有效:

abrulesfpg = rCBA::fpgrowth(
    txns, 
    support = 0.25, 
    confidence = 0.5, 
    maxLength = 10, 
    consequent = "SPIRULINA", 
    verbose = TRUE, 
    parallel = TRUE
)

I know the OP is likely to have discovered this by now, but I've answered this just in case anyone else encounters the same error.我知道 OP 现在可能已经发现了这一点,但我已经回答了这个问题,以防万一其他人遇到同样的错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 R中的fpgrowth错误 - fpgrowth error in R 使用 Sparklyr 的 FPGrowth/关联规则 - FPGrowth/Association Rules using Sparklyr 如何在 sparklyr package 中运行 FPGrowth - how to run FPGrowth in sparklyr package rJava - .jcall调用问题:未找到签名的方法 - rJava - .jcall calling issue: method with signature not found 在 Sparklyr 中使用 ml_fpgrowth 选择支持度和置信度值 - Choosing support and confidence values with ml_fpgrowth in Sparklyr rJava-找不到带有签名的方法 - rJava - method with signature not found Rapidminer FPGrowth也返回子集。 我只需要最多的频繁项目集 - Rapidminer FPGrowth returning subsets as well. I only need the maximum frequent item sets error in.jcall(cell, "V", "setCellValue", value):尝试写入时找不到带有签名 ([D)V 的方法 setCellValue.xlsx - Error in .jcall(cell, "V", "setCellValue", value) : method setCellValue with signature ([D)V not found when attempting write.xlsx 错误解决方案“.jcall中的错误(”RJavaTools“,”Ljava / lang / Object;“,”invokeMethod“,cl,:java.io.IOException:ZIP条目大小太大”? - Solution for error “Error in .jcall(”RJavaTools“, ”Ljava/lang/Object;“, ”invokeMethod“, cl, :java.io.IOException:ZIP entry size is too large”? 写入大 write.xlsx 的问题:错误 in.jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.OutOfMemoryError: Java 堆空间 - Issue writing large write.xlsx : Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.OutOfMemoryError: Java heap space
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM