penalty_function: Penalty Function

Description Usage Arguments Value Note References Examples

View source: R/pen_function.R

Description

Compute the penalty function for nonconvex penalties.

Usage

1
2
3
4
5
6
penalty_function(
  theta = seq(-5, 5, length.out = 1e+05),
  penalty = "atan",
  lambda = 1,
  gamma = c(0.01, 0.05)
)

Arguments

theta

Numeric vector. Values for which the derivative is computed.

penalty

Character string. Which penalty should be used (defaults to "atan")? See ggmncv for the available penalties.

lambda

Numeric. Regularization parameter (defaults to 1).

gamma

Numeric vector. Hyperparameter(s) for the penalty function

Value

A list of class penalty_function, including the following:

Note

Some care is required for specifying gamma. For example, the default value for scad is 3.7 and it must be some value greater than 2 \insertCitefan2001variableGGMncv. The default values in GGMncv are set to recommended values in the respective papers.

References

\insertAllCited

Examples

1
2
3
4
5
func <- penalty_function(theta =  seq(-5,5,length.out = 10000),
                            lambda = 1,
                            gamma = c(0.01, 0.05, 0.1))

head(func$pen)

GGMncv documentation built on Dec. 15, 2021, 9:10 a.m.