Skip to main content

PredictionModel

Trait PredictionModel 

Source
pub trait PredictionModel:
    Send
    + Sync
    + Debug {
    // Required methods
    fn predict_syndrome(
        &self,
        history: &[Array1<u8>],
    ) -> Result<Array1<u8>, QECError>;
    fn update(
        &mut self,
        history: &[Array1<u8>],
        actual: &Array1<u8>,
    ) -> Result<(), QECError>;
    fn get_confidence(&self) -> f64;
}
Expand description

Prediction model trait

Required Methods§

Source

fn predict_syndrome( &self, history: &[Array1<u8>], ) -> Result<Array1<u8>, QECError>

Predict next syndrome

Source

fn update( &mut self, history: &[Array1<u8>], actual: &Array1<u8>, ) -> Result<(), QECError>

Update model with new data

Source

fn get_confidence(&self) -> f64

Get prediction confidence

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§