# huber

Updated:

huber implements the huber loss, defined as $$x^2$$ when $$\left\lvert x\right\rvert \leq M$$ and $$2\left\lvert x\right\rvert -M$$ for $$\left\lvert x\right\rvert \geq M$$

### Syntax

y = huber(x,M)


The operator is implemented using a graph representation based on SOCP and can thus only be used in scenarios where YALMIP can propagate convexity and use a conic model.