Home | History | Annotate | Download | only in ceres

Lines Matching refs:rho

40 void TrivialLoss::Evaluate(double s, double rho[3]) const {
41 rho[0] = s;
42 rho[1] = 1.0;
43 rho[2] = 0.0;
46 void HuberLoss::Evaluate(double s, double rho[3]) const {
51 rho[0] = 2.0 * a_ * r - b_;
52 rho[1] = std::max(std::numeric_limits<double>::min(), a_ / r);
53 rho[2] = - rho[1] / (2.0 * s);
56 rho[0] = s;
57 rho[1] = 1.0;
58 rho[2] = 0.0;
62 void SoftLOneLoss::Evaluate(double s, double rho[3]) const {
66 rho[0] = 2.0 * b_ * (tmp - 1.0);
67 rho[1] = std::max(std::numeric_limits<double>::min(), 1.0 / tmp);
68 rho[2] = - (c_ * rho[1]) / (2.0 * sum);
71 void CauchyLoss::Evaluate(double s, double rho[3]) const {
75 rho[0] = b_ * log(sum);
76 rho[1] = std::max(std::numeric_limits<double>::min(), inv);
77 rho[2] = - c_ * (inv * inv);
80 void ArctanLoss::Evaluate(double s, double rho[3]) const {
84 rho[0] = a_ * atan2(s, a_);
85 rho[1] = std::max(std::numeric_limits<double>::min(), inv);
86 rho[2] = -2.0 * s * b_ * (inv * inv);
97 void TolerantLoss::Evaluate(double s, double rho[3]) const {
99 // The basic equation is rho[0] = b ln(1 + e^x). However, if e^x is too
105 rho[0] = s - a_ - c_;
106 rho[1] = 1.0;
107 rho[2] = 0.0;
110 rho[0] = b_ * log(1.0 + e_x) - c_;
111 rho[1] = std::max(std::numeric_limits<double>::min(), e_x / (1.0 + e_x));
112 rho[2] = 0.5 / (b_ * (1.0 + cosh(x)));
133 void ComposedLoss::Evaluate(double s, double rho[3]) const {
137 rho[0] = rho_f[0];
139 rho[1] = rho_f[1] * rho_g[1];
141 rho[2] = rho_f[2] * rho_g[1] * rho_g[1] + rho_f[1] * rho_g[2];
144 void ScaledLoss::Evaluate(double s, double rho[3]) const {
146 rho[0] = a_ * s;
147 rho[1] = a_;
148 rho[2] = 0.0;
150 rho_->Evaluate(s, rho);
151 rho[0] *= a_;
152 rho[1] *= a_;
153 rho[2] *= a_;