R/hard_thres.R

Defines functions hard_thres

hard_thres <- function(a,lam){
  ind <- (abs(a)<lam)
  a[ind] <- 0
  out <- a
  return(out)
}

Try the SuperPCA package in your browser

Any scripts or data that you put into this service are public.

SuperPCA documentation built on July 26, 2021, 5:06 p.m.