1#ifndef TATOOINE_HUBER_LOSS_H
2#define TATOOINE_HUBER_LOSS_H
6#include <tatooine/real.h>
11template <arithmetic Delta =
int>
13 if (gcem::abs(a) <= delta) {
16 return delta * (gcem::abs(a) - delta / 2);
Definition: concepts.h:30
Definition: algorithm.h:6
auto constexpr huber_loss(floating_point auto const a, Delta const delta=1)
See Wikipedia
Definition: huber_loss.h:12