Learn R Programming

GGMncv (version 2.1.1)

penalty_derivative: Penalty Derivative

Description

Compute the derivative for a nonconvex penalty.

Usage

penalty_derivative(
  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_derivative, including the following:

  • deriv: Data frame including the derivative, theta, gamma, and the chosen penalty.

  • lambda: Regularization parameter.

References

Examples

Run this code
# NOT RUN {
deriv <- penalty_derivative(theta =  seq(-5,5,length.out = 10000),
                            lambda = 1,
                            gamma = c(0.01, 0.05, 0.1))

head(deriv$deriv)
# }

Run the code above in your browser using DataLab