lambda_max | R Documentation |
\lambda_{\mathbf{K}}
that gives the empty graph.Analytic solution for the minimum \lambda_{\mathbf{K}}
that gives the empty graph. In the non-centered setting the bound is not tight, as it is such that both \mathbf{K}
and \boldsymbol{\eta}
are empty. The bound is also not tight if symmetric == "and"
.
lambda_max(elts, symmetric, lambda_ratio = Inf)
elts |
A list, elements necessary for calculations returned by |
symmetric |
A string. If equals |
lambda_ratio |
A positive number (or |
A number, the smallest lambda that produces the empty graph in the centered case, or that gives zero solutions for \mathbf{K}
and \boldsymbol{\eta}
in the non-centered case. If symmetric == "and"
, it is not a tight bound for the empty graph.
# Examples are shown for Gaussian truncated to R+^p only. For other distributions
# on other types of domains, please refer to \code{gen()} or \code{get_elts()},
# as the way to call this function (\code{lambda_max()}) is exactly the same in those cases.
n <- 50
p <- 30
domain <- make_domain("R+", p=p)
mu <- rep(0, p)
K <- diag(p)
x <- tmvtnorm::rtmvnorm(n, mean = mu, sigma = solve(K),
lower = rep(0, p), upper = rep(Inf, p), algorithm = "gibbs",
burn.in.samples = 100, thinning = 10)
dm <- 1 + (1-1/(1+4*exp(1)*max(6*log(p)/n, sqrt(6*log(p)/n))))
h_hp <- get_h_hp("min_pow", 1, 3)
elts_gauss_np <- get_elts(h_hp, x, setting="gaussian", domain=domain,
centered=FALSE, profiled=FALSE, diag=dm)
# Exact analytic solution for the smallest lambda such that K and eta are both zero,
# but not a tight bound for K ONLY
lambda_max(elts_gauss_np, "symmetric", 2)
# Use the upper bound as a starting point for numerical search
test_lambda_bounds2(elts_gauss_np, "symmetric", lambda_ratio=2, lower = FALSE,
lambda_start = lambda_max(elts_gauss_np, "symmetric", 2))
# Exact analytic solution for the smallest lambda such that K and eta are both zero,
# but not a tight bound for K ONLY
lambda_max(elts_gauss_np, "or", 2)
# Use the upper bound as a starting point for numerical search
test_lambda_bounds2(elts_gauss_np, "or", lambda_ratio=2, lower = FALSE,
lambda_start = lambda_max(elts_gauss_np, "or", 2))
# An upper bound, not tight.
lambda_max(elts_gauss_np, "and", 2)
# Use the upper bound as a starting point for numerical search
test_lambda_bounds2(elts_gauss_np, "and", lambda_ratio=2, lower = FALSE,
lambda_start = lambda_max(elts_gauss_np, "and", 2))
elts_gauss_p <- get_elts(h_hp, x, setting="gaussian", domain=domain,
centered=FALSE, profiled=TRUE, diag=dm)
# Exact analytic solution
lambda_max(elts_gauss_p, "symmetric")
# Numerical solution, should be close to the analytic solution
test_lambda_bounds2(elts_gauss_p, "symmetric", lambda_ratio=Inf, lower = FALSE,
lambda_start = NULL)
# Exact analytic solution
lambda_max(elts_gauss_p, "or")
# Numerical solution, should be close to the analytic solution
test_lambda_bounds2(elts_gauss_p, "or", lambda_ratio=Inf, lower = FALSE,
lambda_start = NULL)
# An upper bound, not tight
lambda_max(elts_gauss_p, "and")
# Use the upper bound as a starting point for numerical search
test_lambda_bounds2(elts_gauss_p, "and", lambda_ratio=Inf, lower = FALSE,
lambda_start = lambda_max(elts_gauss_p, "and"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.