huber | R Documentation |
Huber norm function providing a hybrid L1/L2 norm. Huber approximations to the ramp hramp
and tilted absolute value tilted.approx
functions. huber.prime
, hramp.prime
, and tilted.approx.prime
provide the corresponding derivatives.
huber(x, eps)
huber.prime(x, eps)
hramp(x, lower, eps)
hramp.prime(x, lower, eps)
tilted.approx(x, tau, eps)
tilted.approx.prime(x, tau, eps)
x |
numeric vector. |
eps |
epsilon value used in |
tau |
desired tau-quantile. |
lower |
left censoring point. |
tilted.abs
, qrnn.cost
x <- seq(-10, 10, length=100)
plot(x, huber(x, eps=1), type="l", col="black", ylim=c(-2, 10), ylab="")
lines(x, hramp(x, lower=0, eps=1), col="red")
lines(x, tilted.approx(x, tau=0.1, eps=1), col="blue")
lines(x, huber.prime(x, eps=1), col="black", lty=2)
lines(x, hramp.prime(x, lower=0, eps=1), lty=2, col="red")
lines(x, tilted.approx.prime(x, tau=0.1, eps=1), lty=2, col="blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.