CustomScorer

Trait CustomScorer 

Source
pub trait CustomScorer:
    Send
    + Sync
    + Debug {
    // Required methods
    fn score(
        &self,
        y_true: &Array1<Float>,
        y_pred: &Array1<Float>,
    ) -> Result<f64>;
    fn name(&self) -> &str;
    fn higher_is_better(&self) -> bool;
}
Expand description

Custom scoring function trait

Required Methods§

Source

fn score(&self, y_true: &Array1<Float>, y_pred: &Array1<Float>) -> Result<f64>

Compute score given true and predicted values

Source

fn name(&self) -> &str

Get the name of this custom scorer

Source

fn higher_is_better(&self) -> bool

Whether higher scores are better (true) or lower scores are better (false)

Implementors§