1

bnlearn 4.6 has support for custom decomposable scores according to the changelog. I can't figure out how to use it though. I've tried net <- hc(df, score = "custom") and it gives me Error in check.custom.score.function(fun = extra.args$fun): missing the custom score function. Anyone know how to feed the custom function to hc?

elbord77
  • 311
  • 1
  • 2
  • 11

1 Answers1

2

Figured it out from bnlearn:::check.score.args. You need to provide a fun argument, so something like net <- hc(df, score = "custom", fun=function(...) ...). Just for reference, the function signature is function(node, parents, data, args).

elbord77
  • 311
  • 1
  • 2
  • 11