Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

alpha.star

Estimate the optimal imaginary sample size for BDe(u)


Description

Estimate the optimal value of the imaginary sample size for the BDe score, assuming a uniform prior and given a network structure and a data set.

Usage

alpha.star(x, data, debug = FALSE)

Arguments

x

an object of class bn (for bn.fit and custom.fit) or an object of class bn.fit (for bn.net).

data

a data frame containing the variables in the model.

debug

a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.

Value

alpha.star() returns a positive number, the estimated optimal imaginary sample size value.

Author(s)

Marco Scutari

References

Steck H (2008). "Learning the Bayesian Network Structure: Dirichlet Prior versus Data". Proceedings of the 24th Conference on Uncertainty in Artificial Intelligence, 511–518.

Examples

data(learning.test)
dag = hc(learning.test, score = "bic")

for (i in 1:3) {

  a = alpha.star(dag, learning.test)
  dag = hc(learning.test, score = "bde", iss = a)

}#FOR

bnlearn

Bayesian Network Structure Learning, Parameter Learning and Inference

v4.6.1
GPL (>= 2)
Authors
Marco Scutari [aut, cre], Robert Ness [ctb]
Initial release
2020-09-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.