PredictWithConfidence

Trait PredictWithConfidence 

Source
pub trait PredictWithConfidence<Rhs>: Predict<Rhs> {
    type Confidence;

    // Required method
    fn predict_with_confidence(
        &self,
        input: &Rhs,
    ) -> Result<(Self::Output, Self::Confidence), NeuralError>;
}
Expand description

This trait extends the Predict trait to include a confidence score for the prediction. The confidence score is calculated as the inverse of the variance of the output.

Required Associated Types§

Required Methods§

Source

fn predict_with_confidence( &self, input: &Rhs, ) -> Result<(Self::Output, Self::Confidence), NeuralError>

Implementors§

Source§

impl<M, U, A, D> PredictWithConfidence<U> for M
where A: Float + FromPrimitive + ScalarOperand, D: Dimension, M: Predict<U, Output = ArrayBase<OwnedRepr<A>, D>>,