【发布时间】: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?
【问题讨论】:
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?
【问题讨论】:
从bnlearn:::check.score.args 中找出来。您需要提供fun 参数,例如net <- hc(df, score = "custom", fun=function(...) ...)。仅供参考,函数签名为function(node, parents, data, args)。
【讨论】: