projection_nb {sharpPen} | R Documentation |
Compute the projection operator for norm balls. For example, we construct
\lambda P_{B_{\| \cdot \|_*}[0,r]}(x/\lambda) = projection_nb(\lambda,r,\| \cdot \|_*,x)
,
where \| \cdot \|_*
can be l_{1}
-norm, l_{2}
-norm, and
l_{\infty}
-norm.
projection_nb(
lambda,radius,family=c("norm2","norm1","norminf"),
input)
lambda |
parameter |
radius |
parameter |
family |
select the norm ball type, can be |
input |
input x in the above equation |
Take x
as input, \lambda
and r
as parameters.
Calculate \lambda P_{B_{\| \cdot \|_*}[0,r]}(x/\lambda)
for a given norm ball type.
projection |
|
D.Wang and W.J.Braun
set.seed(1234567)
family <- "norm1"
temp_p1<-rep(10,100)
projection_nb(3,1,family=family,temp_p1)