This class represents the elementwise Huber function, \(Huber(x, M = 1)\)
for \(|x| \geq |M|\)
for \(|x| \leq |M|.\)
Huber(x, M = 1)
# S4 method for class 'Huber'
to_numeric(object, values)
# S4 method for class 'Huber'
sign_from_args(object)
# S4 method for class 'Huber'
is_atom_convex(object)
# S4 method for class 'Huber'
is_atom_concave(object)
# S4 method for class 'Huber'
is_incr(object, idx)
# S4 method for class 'Huber'
is_decr(object, idx)
# S4 method for class 'Huber'
is_quadratic(object)
# S4 method for class 'Huber'
get_data(object)
# S4 method for class 'Huber'
validate_args(object)
# S4 method for class 'Huber'
.grad(object, values)
An Expression object.
A positive scalar value representing the threshold. Defaults to 1.
A Huber object.
A list of numeric values for the arguments
An index into the atom.
to_numeric(Huber)
: The Huber function evaluted elementwise on the input value.
sign_from_args(Huber)
: The atom is positive.
is_atom_convex(Huber)
: The atom is convex.
is_atom_concave(Huber)
: The atom is not concave.
is_incr(Huber)
: A logical value indicating whether the atom is weakly increasing.
is_decr(Huber)
: A logical value indicating whether the atom is weakly decreasing.
is_quadratic(Huber)
: The atom is quadratic if x
is affine.
get_data(Huber)
: A list containing the parameter M
.
validate_args(Huber)
: Check that M
is a non-negative constant.
.grad(Huber)
: Gives the (sub/super)gradient of the atom w.r.t. each variable
x
An Expression or numeric constant.
M
A positive scalar value representing the threshold. Defaults to 1.