FeedbackEvaluator

Trait FeedbackEvaluator 

Source
pub trait FeedbackEvaluator {
    // Required method
    async fn feedback_metric(
        &self,
        example: &Example,
        prediction: &Prediction,
    ) -> FeedbackMetric;

    // Provided method
    async fn multi_objective_metric(
        &self,
        example: &Example,
        prediction: &Prediction,
    ) -> Vec<FeedbackMetric> { ... }
}
Expand description

Trait for evaluators that provide rich feedback

This extends the basic Evaluator trait to return feedback alongside scores.

Required Methods§

Source

async fn feedback_metric( &self, example: &Example, prediction: &Prediction, ) -> FeedbackMetric

Evaluate an example and return both score and feedback

Provided Methods§

Source

async fn multi_objective_metric( &self, example: &Example, prediction: &Prediction, ) -> Vec<FeedbackMetric>

Evaluate with multiple objectives (for multi-objective optimization)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§