【问题标题】:A duplicate bin range was detected. Try increasing the bin range precision检测到重复的 bin 范围。尝试增加 bin 范围精度
【发布时间】:2018-07-21 07:28:18
【问题描述】:

这个错误有点帮助?​​

当我在 R 中运行 CFS 时得到它

运行代码:

best_features<- cfs(Target~.,df)

其中 df 是数据集 和 Targetbest_features 是不言自明的。

错误:

Error in .jcall("weka/filters/Filter", "Lweka/core/Instances;", "useFilter",  :  
java.lang.IllegalArgumentException: A duplicate bin range was detected. Try increasing the bin range precision.

【问题讨论】:

  • Target你有多少级?
  • 它有真正的价值,如果这就是你的要求。
  • 有多少种不同的真实值?范围是多少?

标签: r weka cfs fselector


【解决方案1】:

“@ 987654321”错误被RWeka::Discretize 987654323 @ @函数在内部调用。当数据列包含太多仅用少量不同的值时发生(因为Discretize命名箱时使用固定点表示)。

解决方案是按大因素缩放数据:

numcols <- sapply(df, is.numeric)  # can be omitted if data is entirely numeric
df[numcols] <- df[numcols] * 1000  # try larger values if this is not enough

best_features <- cfs(Target~.,df)  # or anything else that uses FSelector

【讨论】:

    猜你喜欢
    • 2015-10-22
    • 2013-07-17
    • 2017-10-12
    • 2017-02-13
    • 1970-01-01
    • 2019-11-24
    • 2011-08-05
    • 2011-12-16
    • 2018-04-09
    相关资源
    最近更新 更多