pub trait EnsembleStrategy: Send + Sync {
// Required methods
fn combine_predictions(
&self,
predictions: Vec<ArrayD<f64>>,
) -> Result<ArrayD<f64>>;
fn get_weights(&self) -> Vec<f64>;
fn update_weights(&mut self, performances: Vec<f64>) -> Result<()>;
fn description(&self) -> String;
}
Expand description
Ensemble strategy trait
Required Methods§
Sourcefn combine_predictions(
&self,
predictions: Vec<ArrayD<f64>>,
) -> Result<ArrayD<f64>>
fn combine_predictions( &self, predictions: Vec<ArrayD<f64>>, ) -> Result<ArrayD<f64>>
Combine predictions from multiple models
Sourcefn get_weights(&self) -> Vec<f64>
fn get_weights(&self) -> Vec<f64>
Get ensemble weights
Sourcefn update_weights(&mut self, performances: Vec<f64>) -> Result<()>
fn update_weights(&mut self, performances: Vec<f64>) -> Result<()>
Update weights based on performance
Sourcefn description(&self) -> String
fn description(&self) -> String
Strategy description