|
| quantileloss (float &tau_) |
|
std::string | getType () |
|
float | getLoss (shared_data *, float prediction, float label) |
|
float | getUpdate (float prediction, float label, float update_scale, float pred_per_update) |
|
float | getUnsafeUpdate (float prediction, float label, float update_scale) |
|
float | getRevertingWeight (shared_data *sd, float prediction, float eta_t) |
|
float | first_derivative (shared_data *, float prediction, float label) |
|
float | getSquareGrad (float prediction, float label) |
|
float | second_derivative (shared_data *, float, float) |
|
virtual | ~loss_function () |
|
Definition at line 231 of file loss_functions.cc.
◆ quantileloss()
quantileloss::quantileloss |
( |
float & |
tau_ | ) |
|
|
inline |
◆ first_derivative()
float quantileloss::first_derivative |
( |
shared_data * |
, |
|
|
float |
prediction, |
|
|
float |
label |
|
) |
| |
|
inlinevirtual |
◆ getLoss()
float quantileloss::getLoss |
( |
shared_data * |
, |
|
|
float |
prediction, |
|
|
float |
label |
|
) |
| |
|
inlinevirtual |
◆ getRevertingWeight()
float quantileloss::getRevertingWeight |
( |
shared_data * |
sd, |
|
|
float |
prediction, |
|
|
float |
eta_t |
|
) |
| |
|
inlinevirtual |
◆ getSquareGrad()
float quantileloss::getSquareGrad |
( |
float |
prediction, |
|
|
float |
label |
|
) |
| |
|
inlinevirtual |
◆ getType()
std::string quantileloss::getType |
( |
| ) |
|
|
inlinevirtual |
◆ getUnsafeUpdate()
float quantileloss::getUnsafeUpdate |
( |
float |
prediction, |
|
|
float |
label, |
|
|
float |
update_scale |
|
) |
| |
|
inlinevirtual |
◆ getUpdate()
float quantileloss::getUpdate |
( |
float |
prediction, |
|
|
float |
label, |
|
|
float |
update_scale, |
|
|
float |
pred_per_update |
|
) |
| |
|
inlinevirtual |
Implements loss_function.
Definition at line 247 of file loss_functions.cc.
249 float err = label - prediction;
252 float normal = update_scale * pred_per_update;
255 normal =
tau * normal;
256 return (normal < err ?
tau * update_scale : err / pred_per_update);
260 normal = -(1 -
tau) * normal;
261 return (normal > err ? (
tau - 1) * update_scale : err / pred_per_update);
◆ second_derivative()
float quantileloss::second_derivative |
( |
shared_data * |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
inlinevirtual |
◆ tau
The documentation for this class was generated from the following file: