Skip to contents

A thin wrapper on the bnlearn::score function.

Usage

BNLearnScorer(node, parents, ...)

Arguments

node

Name of node to score.

parents

The parents of node.

...

The ellipsis is used to pass other parameters to the scorer.

Value

A numeric value representing the log score of the node given the parents.

Examples

data <- bnlearn::learning.test
BNLearnScorer('A', c('B', 'C'), data = data)
#> [1] -4395.422
BNLearnScorer('A', c(), data = data)
#> [1] -5501.568
BNLearnScorer('A', vector(), data = data)
#> [1] -5501.568
BNLearnScorer('A', NULL, data = data)
#> [1] -5501.568
BNLearnScorer('A', c('B', 'C'), data = data, type = "bde", iss = 100)
#> [1] -4374.008
BNLearnScorer('A', c('B', 'C'), data = data, type = "bde", iss = 1)
#> [1] -4403.79