sklears_feature_selection/
lib.rs

1#![allow(dead_code)]
2#![allow(non_snake_case)]
3#![allow(missing_docs)]
4#![allow(deprecated)]
5#![allow(clippy::all)]
6#![allow(clippy::pedantic)]
7#![allow(clippy::nursery)]
8//! Feature selection algorithms
9//!
10//! This module provides algorithms for selecting relevant features from data,
11//! compatible with scikit-learn's feature_selection module.
12
13pub mod automl;
14pub mod base;
15pub mod bayesian;
16pub mod benchmark;
17// TODO: ndarray 0.17 - uses disabled embedded module
18// pub mod comparison_tests;
19pub mod comprehensive_benchmark;
20pub mod domain_benchmark;
21pub mod domain_specific;
22// TODO: ndarray 0.17 HRTB trait bound issues
23// pub mod embedded;
24// pub mod ensemble_selectors;
25pub mod evaluation;
26pub mod filter;
27pub mod fluent_api;
28// TODO: ndarray 0.17 HRTB trait bound issues
29// pub mod genetic_optimization;
30pub mod group_selection;
31pub mod hierarchical;
32pub mod ml_based;
33pub mod multi_label;
34pub mod optimization;
35pub mod parallel;
36pub mod performance;
37pub mod pipeline;
38pub mod plugin;
39pub mod regularization_selectors;
40#[cfg(feature = "serde")]
41pub mod serialization;
42pub mod spectral;
43pub mod statistical_tests;
44pub mod streaming;
45// TODO: ndarray 0.17 HRTB trait bound issues
46// pub mod tree_based_selectors;
47pub mod type_safe;
48// TODO: ndarray 0.17 HRTB trait bound issues
49// pub mod validation;
50// pub mod wrapper;
51
52pub use automl::{
53    analyze_and_recommend, comprehensive_automl, quick_automl, AdvancedHyperparameterOptimizer,
54    AutoMLBenchmark, AutoMLError, AutoMLFactory, AutoMLFactoryConfig, AutoMLMethod, AutoMLResults,
55    AutoMLSummary, AutomatedFeatureSelectionPipeline, ComputationalBudget, DataAnalyzer,
56    DataCharacteristics, HyperparameterOptimizer, MethodSelector, PipelineConfig,
57    PipelineOptimizer, PreprocessingIntegration, TargetType, ValidationStrategy,
58};
59pub use base::*;
60pub use benchmark::{
61    BenchmarkConfig, BenchmarkDataset, BenchmarkSuiteResults, BenchmarkableMethod,
62    FeatureSelectionBenchmark, RandomSelectionMethod, UnivariateFilterMethod,
63};
64pub use filter::*;
65
66// Re-export commonly used items
67pub use crate::filter::{
68    CompressedSensingAlgorithm, CompressedSensingSelector, CorrelationThreshold,
69    GenericUnivariateSelect, HighDimensionalInference, ImbalancedDataSelector, ImbalancedStrategy,
70    InferenceMethod, KnockoffSelector, KnockoffType, RReliefF, Relief, ReliefF, SelectFdr,
71    SelectFpr, SelectFwe, SelectKBest, SelectKBestParallel, SelectPercentile,
72    SureIndependenceScreening, VarianceThreshold,
73};
74
75// TODO: ndarray 0.17 HRTB trait bound issues
76// pub use crate::wrapper::{
77//     FeatureImportance, HasCoefficients, IndexableTarget, RFECVResults, SelectFromModel,
78//     SequentialFeatureSelector, RFE, RFECV,
79// };
80
81// TODO: ndarray 0.17 HRTB trait bound issues
82// pub use crate::embedded::{
83//     ConsensusFeatureSelector, ConsensusMethod, ConsensusThresholdParams, MultiTaskFeatureSelector,
84//     StabilitySelector,
85// };
86
87// TODO: ndarray 0.17 HRTB trait bound issues
88// pub use crate::genetic_optimization::{
89//     CostSensitiveObjective, CrossValidator, FairnessAwareObjective, FairnessMetric,
90//     FeatureCountObjective, FeatureDiversityObjective, FeatureImportanceObjective, GeneticSelector,
91//     Individual, KFold, MultiObjectiveFeatureSelector, MultiObjectiveMethod, ObjectiveFunction,
92//     PredictivePerformanceObjective,
93// };
94
95// TODO: ndarray 0.17 HRTB trait bound issues
96// pub use crate::ensemble_selectors::{
97//     extract_features, AggregationMethod, BootstrapSelector, BorutaSelector, EnsembleFeatureRanking,
98//     SelectorFunction, UnivariateMethod, UnivariateSelector,
99// };
100
101// TODO: ndarray 0.17 HRTB trait bound issues
102// pub use crate::tree_based_selectors::{
103//     GradientBoostingSelector, TreeImportance, TreeImportanceSelector, TreeSelector,
104// };
105
106pub use crate::regularization_selectors::{ElasticNetSelector, LassoSelector, RidgeSelector};
107
108pub use crate::domain_specific::{
109    AdvancedNLPFeatureSelector, BioinformaticsFeatureSelector, FinanceFeatureSelector,
110    GraphFeatureSelector, ImageFeatureSelector, MultiModalFeatureSelector, TextFeatureSelector,
111    TimeSeriesSelector,
112};
113
114pub use crate::domain_benchmark::{
115    run_quick_benchmark, BenchmarkConfig as DomainBenchmarkConfig, BenchmarkResult, BenchmarkSuite,
116    BenchmarkSummary, DomainBenchmarkFramework,
117};
118
119pub use crate::ml_based::{
120    AttentionFeatureSelector, MetaLearningFeatureSelector, NeuralFeatureSelector, RLFeatureSelector,
121};
122
123// Let's export only the items that actually exist
124pub use crate::evaluation::{
125    ComparativeAnalysis, FeatureInteractionAnalysis, FeatureSetDiversityMeasures,
126    FeatureSetVisualization, NestedCVResults, NestedCrossValidation, PowerAnalysis,
127    QualityAssessment, RedundancyMeasures, RelevanceScoring, StabilityMeasures, StratifiedKFold,
128};
129
130// pub use crate::group_selection::{
131//     GraphStructuredSparsitySelector, GroupLassoSelector, HierarchicalStructuredSparsitySelector,
132//     OverlappingGroupSparsitySelector, SparseGroupLassoSelector,
133// };
134
135pub use crate::statistical_tests::{
136    chi2,
137    f_classif,
138    f_oneway,
139    f_regression,
140    kruskal_wallis,
141    mann_whitney_u,
142    mutual_info_classif,
143    mutual_info_regression,
144    // permutation_tests, spearman_correlation, transfer_entropy - commented out
145    r_regression,
146};
147
148// pub use crate::streaming::{
149//     ConceptDriftAwareSelector, OnlineFeatureSelector, StreamingFeatureImportance,
150// };
151
152// pub use crate::hierarchical::{
153//     FeatureHierarchy, HierarchicalFeatureSelector, HierarchicalSelectionStrategy, HierarchyNode,
154//     MultiLevelHierarchicalSelector, ScoreAggregation,
155// };
156
157pub use crate::multi_label::{
158    AggregateMethod, LabelSpecificSelector, MultiLabelFeatureSelector, MultiLabelStrategy,
159    MultiLabelTarget,
160};
161
162pub use crate::bayesian::{
163    BayesianInferenceMethod, BayesianModelAveraging, BayesianVariableSelector, PriorType,
164};
165
166pub use crate::spectral::{
167    GraphConstructionMethod, KernelFeatureSelector, KernelType, LaplacianScoreSelector,
168    ManifoldFeatureSelector, ManifoldMethod, SpectralFeatureSelector,
169};
170
171pub use crate::optimization::{
172    ADMMFeatureSelector, ConvexFeatureSelector, IntegerProgrammingFeatureSelector,
173    ProximalGradientSelector, SemidefiniteFeatureSelector,
174};
175
176// TODO: ndarray 0.17 HRTB trait bound issues
177// pub use crate::validation::{
178//     DistributionalPropertyTest, PermutationSignificanceTest, RobustnessTest,
179//     SelectionConsistencyTest, StatisticalValidationFramework, StatisticalValidationResults,
180// };
181
182pub use crate::parallel::{
183    ParallelCorrelationComputer, ParallelFeatureEvaluator, ParallelFeatureRanker,
184    ParallelSelectionUtils, ParallelUnivariateRegressionScorer, ParallelUnivariateScorer,
185    ParallelVarianceComputer,
186};
187
188pub use crate::plugin::{
189    ComputationalComplexity, FeatureSelectionPlugin, LoggingMiddleware, MemoryComplexity,
190    PerformanceMetrics, PerformanceMiddleware, PipelineResult, PluginContext, PluginMetadata,
191    PluginPipeline, PluginRegistry, PluginResult, StepResult as PluginStepResult,
192};
193
194pub use crate::pipeline::{
195    BinningStrategy, FeatureSelectionPipeline, OptimizationConfiguration, PipelineConfiguration,
196    PreprocessingStep, SelectionMethod, Trained, Untrained,
197};
198
199pub use crate::type_safe::{data_states, selection_types, FeatureIndex, FeatureMask};
200
201pub use crate::performance::SIMDStats;
202
203pub use crate::fluent_api::{
204    presets, FeatureSelectionBuilder, FluentConfig, FluentSelectionResult, SelectionStep,
205    StepResult,
206};
207
208pub use crate::comprehensive_benchmark::{
209    quick_benchmark, BenchmarkConfiguration, BenchmarkDataset as ComprehensiveBenchmarkDataset,
210    BenchmarkMethod, BenchmarkMetric, ComprehensiveBenchmarkResults, ComprehensiveBenchmarkSuite,
211    DatasetDomain, DatasetMetadata, DetailedMethodResult, MethodCategory, TaskType,
212};
213
214#[cfg(feature = "serde")]
215pub use crate::serialization::{exports, ExportFormat, SelectionResultsIO};
216
217#[allow(non_snake_case)]
218#[cfg(test)]
219mod tests {
220    #[test]
221    fn it_works() {
222        assert_eq!(2 + 2, 4);
223    }
224}
225
226#[allow(non_snake_case)]
227#[cfg(test)]
228mod domain_specific_tests;