max_lambda: max_lambda

Description Usage Arguments Value Examples

View source: R/lambda.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

## End(Not run)

discretecdAlgorithm documentation built on March 13, 2020, 2:34 a.m.