【问题标题】:How to use custom score functions in bnlearn version 4.6?如何在 bnlearn 4.6 版中使用自定义评分函数?
【发布时间】:2020-02-14 17:44:27
【问题描述】:

bnlearn 4.6 支持根据changelog 自定义可分解分数。我不知道如何使用它。我试过net <- hc(df, score = "custom"),它给了我Error in check.custom.score.function(fun = extra.args$fun): missing the custom score function。有谁知道如何将自定义函数提供给hc

【问题讨论】:

    标签: r bnlearn


    【解决方案1】:

    bnlearn:::check.score.args 中找出来。您需要提供fun 参数,例如net <- hc(df, score = "custom", fun=function(...) ...)。仅供参考,函数签名为function(node, parents, data, args)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-02
      • 1970-01-01
      • 2015-03-10
      • 2019-05-19
      • 2018-03-14
      • 2013-10-16
      • 1970-01-01
      相关资源
      最近更新 更多