Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
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).
bnlearn:::check.score.args
fun
net <- hc(df, score = "custom", fun=function(...) ...)
function(node, parents, data, args)