@brief implements the original DCS loss function * * @param s squared non-weighted error * @param rho [p(s) p'(s) p''(s)] */
| 30 | * @param rho [p(s) p'(s) p''(s)] |
| 31 | */ |
| 32 | void DCSLoss::Evaluate(double s, double rho[3]) const |
| 33 | { |
| 34 | if (s <= Phi_) |
| 35 | { |
| 36 | rho[0] = s; |
| 37 | rho[1] = 1; |
| 38 | rho[2] = 0; |
| 39 | } |
| 40 | else |
| 41 | { |
| 42 | rho[0] = Phi_ * (3 * s - Phi_) / (s + Phi_); |
| 43 | rho[1] = (3*Phi_)/(Phi_ + s) + (Phi_*(Phi_ - 3*s))/pow((Phi_ + s), 2); |
| 44 | rho[2] = - (6*Phi_)/pow((Phi_ + s), 2) - (2*Phi_*(Phi_ - 3*s))/pow((Phi_ + s), 3); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | /** @brief implements the a new DCS like loss function which is closer related to the mathematical meaning of a gauss distribution |
| 49 | * |
nothing calls this directly
no outgoing calls
no test coverage detected