Learn R Programming

discretecdAlgorithm (version 0.0.7)

max_lambda: max_lambda

Description

A method to calculate the value of maximum lambda along a solution path. See paper Gu et al. (2016) chapter 3.4 for more detail.

Usage

max_lambda(indata, weights = NULL, weight.scale = 1, upperbound = 100)

Arguments

indata

A sparsebnData object

weights

Weight matrix

weight.scale

A positive number to scale weight matrix.

upperbound

A large positive value used to truncate the adaptive weights. A -1 value indicates that there is no truncation.

Value

The maximum lambda along the solution path.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
### Generate some random data
dat <- matrix(rbinom(200, size = 3, prob = 0.4), nrow = 20)
# for observational data
dat <- sparsebnUtils::sparsebnData(dat, type = "discrete")

# generate the maximum lambda
max_lambda(indata = dat)
# }

Run the code above in your browser using DataLab