pub struct EnsembleAnalyzer {
pub importance_method: ImportanceAggregationMethod,
pub random_state: Option<u64>,
pub n_bootstrap: usize,
pub confidence_level: Float,
}Expand description
Ensemble analyzer for feature importance and uncertainty quantification
Fields§
§importance_method: ImportanceAggregationMethodMethod for aggregating feature importances
random_state: Option<u64>Random state for reproducible analysis
n_bootstrap: usizeNumber of bootstrap samples for confidence intervals
confidence_level: FloatConfidence level for intervals
Implementations§
Source§impl EnsembleAnalyzer
impl EnsembleAnalyzer
Sourcepub fn new(importance_method: ImportanceAggregationMethod) -> Self
pub fn new(importance_method: ImportanceAggregationMethod) -> Self
Create a new ensemble analyzer
Sourcepub fn with_bootstrap(self, n_bootstrap: usize, confidence_level: Float) -> Self
pub fn with_bootstrap(self, n_bootstrap: usize, confidence_level: Float) -> Self
Configure bootstrap parameters
Sourcepub fn with_random_state(self, random_state: u64) -> Self
pub fn with_random_state(self, random_state: u64) -> Self
Set random state for reproducible results
Sourcepub fn analyze_feature_importance(
&self,
individual_importances: &Array2<Float>,
model_weights: Option<&Array1<Float>>,
) -> Result<FeatureImportanceAnalysis>
pub fn analyze_feature_importance( &self, individual_importances: &Array2<Float>, model_weights: Option<&Array1<Float>>, ) -> Result<FeatureImportanceAnalysis>
Analyze feature importances across ensemble models
Sourcepub fn quantify_uncertainty(
&self,
ensemble_predictions: &Array2<Float>,
true_labels: Option<&Array1<Float>>,
) -> Result<UncertaintyQuantification>
pub fn quantify_uncertainty( &self, ensemble_predictions: &Array2<Float>, true_labels: Option<&Array1<Float>>, ) -> Result<UncertaintyQuantification>
Quantify uncertainty in ensemble predictions
Source§impl EnsembleAnalyzer
Convenience functions for common analysis tasks
impl EnsembleAnalyzer
Convenience functions for common analysis tasks
Sourcepub fn mean_importance() -> Self
pub fn mean_importance() -> Self
Create analyzer for mean-based feature importance aggregation
Sourcepub fn weighted_importance(weights: Vec<Float>) -> Self
pub fn weighted_importance(weights: Vec<Float>) -> Self
Create analyzer for weighted feature importance aggregation
Sourcepub fn robust_importance() -> Self
pub fn robust_importance() -> Self
Create analyzer for robust median-based aggregation
Sourcepub fn rank_based_importance() -> Self
pub fn rank_based_importance() -> Self
Create analyzer for rank-based aggregation
Sourcepub fn permutation_importance(n_repeats: usize) -> Self
pub fn permutation_importance(n_repeats: usize) -> Self
Create analyzer with permutation-based importance
Sourcepub fn shap_importance(background_samples: usize) -> Self
pub fn shap_importance(background_samples: usize) -> Self
Create analyzer with SHAP-based importance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnsembleAnalyzer
impl RefUnwindSafe for EnsembleAnalyzer
impl Send for EnsembleAnalyzer
impl Sync for EnsembleAnalyzer
impl Unpin for EnsembleAnalyzer
impl UnwindSafe for EnsembleAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more