pub trait ObjectiveFunction {
    // Required methods
    fn calc_loss(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>;
    fn calc_grad_hess(
        y: &[f64],
        yhat: &[f64],
        sample_weight: &[f64]
    ) -> (Vec<f32>, Vec<f32>);
    fn calc_grad(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>;
    fn calc_hess(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>;
    fn calc_init(y: &[f64], sample_weight: &[f64]) -> f64;
    fn default_metric() -> Metric;
}

Required Methods§

source

fn calc_loss(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>

source

fn calc_grad_hess( y: &[f64], yhat: &[f64], sample_weight: &[f64] ) -> (Vec<f32>, Vec<f32>)

source

fn calc_grad(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>

source

fn calc_hess(y: &[f64], yhat: &[f64], sample_weight: &[f64]) -> Vec<f32>

source

fn calc_init(y: &[f64], sample_weight: &[f64]) -> f64

source

fn default_metric() -> Metric

Implementors§