pub trait PredictionProvider:
Debug
+ Send
+ Sync {
// Required methods
fn predict(
&self,
features: &Array2<Float>,
coefficients: &Array1<Float>,
intercept: Option<Float>,
) -> Result<Array1<Float>>;
fn name(&self) -> &'static str;
// Provided methods
fn predict_with_confidence(
&self,
features: &Array2<Float>,
coefficients: &Array1<Float>,
intercept: Option<Float>,
confidence_level: Float,
) -> Result<PredictionWithConfidence> { ... }
fn predict_with_uncertainty(
&self,
features: &Array2<Float>,
coefficients: &Array1<Float>,
intercept: Option<Float>,
) -> Result<PredictionWithUncertainty> { ... }
fn supports_confidence_intervals(&self) -> bool { ... }
fn supports_uncertainty_quantification(&self) -> bool { ... }
}Expand description
Extensible prediction interface supporting different prediction types
Required Methods§
fn predict( &self, features: &Array2<Float>, coefficients: &Array1<Float>, intercept: Option<Float>, ) -> Result<Array1<Float>>
Provided Methods§
fn predict_with_confidence( &self, features: &Array2<Float>, coefficients: &Array1<Float>, intercept: Option<Float>, confidence_level: Float, ) -> Result<PredictionWithConfidence>
Sourcefn predict_with_uncertainty(
&self,
features: &Array2<Float>,
coefficients: &Array1<Float>,
intercept: Option<Float>,
) -> Result<PredictionWithUncertainty>
fn predict_with_uncertainty( &self, features: &Array2<Float>, coefficients: &Array1<Float>, intercept: Option<Float>, ) -> Result<PredictionWithUncertainty>
Prediction with uncertainty quantification (if supported)
Sourcefn supports_confidence_intervals(&self) -> bool
fn supports_confidence_intervals(&self) -> bool
Check if this provider supports confidence intervals
Sourcefn supports_uncertainty_quantification(&self) -> bool
fn supports_uncertainty_quantification(&self) -> bool
Check if this provider supports uncertainty quantification