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§
Sourcefn score(&self, y_true: &Array1<Float>, y_pred: &Array1<Float>) -> Result<f64>
fn score(&self, y_true: &Array1<Float>, y_pred: &Array1<Float>) -> Result<f64>
Compute score given true and predicted values
Sourcefn higher_is_better(&self) -> bool
fn higher_is_better(&self) -> bool
Whether higher scores are better (true) or lower scores are better (false)