Nothing
#' Evaluates each element of \eqn{\beta} using soft thresholding operator.
#' @param x \eqn{\beta} coordinate
#' @param kappa \eqn{\kappa} value in general or \eqn{\lambda_1} for covariance updating.
#' @return x value after applying soft thresholding operator
soft.thresh <- function(x ,kappa){
# initializing
# changing according to rule
if (abs(x)>kappa){
x <- sign(x)*(abs(x)-kappa)
} else{
x <- 0
}
return(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.