bnlearn 4.6根据更改日志支持自定义可分解分数。我不知道如何使用它。我已经尝试过了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)
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句