learn.tbn: Learn a Tweedie Bayesian Network.

Description Usage Arguments Value Examples

Description

This function builds a Tweedie Bayesian network based on a data set. It combines both structure and parameters learning. If a known graph is provided, only the parameters will be estimated relying on the provided network structure.

Usage

1
learn.tbn(data, pgrids, G = NULL, nodes.order = NULL, conf.level = 0.05)

Arguments

data

a data frame containing the sample used to learn the model.

pgrids

a list of numeric vectors containing the values among which the power parameters are chosen in order to maximize the model's log-likelihood. If the power parameter is knonw, each pgrid vector will contain a single value.

G

(optional) the Tweedie Bayesian network structure as an adjacency matrix i.e., G[i,j] =1 if Xj is a parent of Xi. If no graph is provided, the structure will be learned relying on student statistical tests.

nodes.order

(optional) The nodes ordering defining an ancestral ordering of the Bayesian network.

conf.level

(optioal) The confidence level for the structure learning. Default value is 0.05.

Value

This function returns a named list consting of the Tweedie bayesian network structure and parameters.

Examples

1
2
3
4
5
# 3 nodes: the third is node has a Gaussian conditional distribution.
## Not run: 
learn.tbn(data, pgrids=list(c(2,3), c(2.2,2.3,2.4), c(0)))

## End(Not run)

km20/tbn documentation built on May 29, 2019, 11:44 a.m.