one.step: Metropolis-Hastings Simulation

Description Usage Arguments Value Examples

View source: R/one.step.R

Description

Do one step of Metropolis-Hastings algorithm: Propose a new graph and either accept or decline it.

Usage

1
2
3
one.step(nw, dataset, verbose = TRUE, score = BICbnnet, whitelist = NULL,
  blacklist = NULL, lprior = log.prior, move.score = NULL,
  move.lprior = NULL, move.proposals = NULL)

Arguments

nw

mhnet network

dataset

A data frame to use

verbose

If TRUE then report messanges and plots will be given

score

A function to calculate BIC

whitelist

For move proposal, 2-column matrix or data.frame with compulsory edges (vertices as numbers)

blacklist

For move proposal, 2-column matrix or data.frame with forbidden edges (vertices as numbers)

lprior

Log of prior distribution of acyclic directed graph

move.score

A function to adjust the score to addition / removal / reversal of an edge

move.lprior

A function to adjust the log-prior to addition / removal / reversal of an edge

move.proposals

A function to adjust the proposals to addition / removal / reversal of an edge

Value

mhnet network

Examples

1
2
3
rg <- tabu(learning.test)
nw <- import.bnlearn(rg)
one.step(nw, learning.test)

simecek/mhnet documentation built on May 29, 2019, 10:01 p.m.