pub struct QuantileLoss {
pub tau: f64,
}Expand description
Quantile (pinball) loss with target quantile tau.
§Parameters
tauin (0, 1): target quantile.tau = 0.5targets the median,tau = 0.9targets the 90th percentile, etc.
Fields§
§tau: f64Target quantile in (0, 1).
Implementations§
Trait Implementations§
Source§impl Clone for QuantileLoss
impl Clone for QuantileLoss
Source§fn clone(&self) -> QuantileLoss
fn clone(&self) -> QuantileLoss
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuantileLoss
impl Debug for QuantileLoss
Source§impl Loss for QuantileLoss
impl Loss for QuantileLoss
Source§fn n_outputs(&self) -> usize
fn n_outputs(&self) -> usize
Number of output dimensions (1 for regression/binary, C for multiclass).
Source§fn gradient(&self, target: f64, prediction: f64) -> f64
fn gradient(&self, target: f64, prediction: f64) -> f64
First derivative of the loss with respect to prediction: dL/df.
Source§fn hessian(&self, _target: f64, _prediction: f64) -> f64
fn hessian(&self, _target: f64, _prediction: f64) -> f64
Second derivative of the loss with respect to prediction: d^2L/df^2.
Source§fn predict_transform(&self, raw: f64) -> f64
fn predict_transform(&self, raw: f64) -> f64
Transform raw model output to final prediction (identity for regression, sigmoid for binary).
Source§fn initial_prediction(&self, targets: &[f64]) -> f64
fn initial_prediction(&self, targets: &[f64]) -> f64
Initial constant prediction (before any trees). Typically the optimal constant
that minimizes sum of losses over the given targets.
impl Copy for QuantileLoss
Auto Trait Implementations§
impl Freeze for QuantileLoss
impl RefUnwindSafe for QuantileLoss
impl Send for QuantileLoss
impl Sync for QuantileLoss
impl Unpin for QuantileLoss
impl UnsafeUnpin for QuantileLoss
impl UnwindSafe for QuantileLoss
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more