API

Baseclasses

FeatureDescriptor(key[, resolve_intervals])

The class FeatureDescriptor abstracts the configuration of features the selection methods are to retrieve from the spectral data.

SpectralSelector(model_hyperparams, n_cv_folds)

Top level base class for all Auswahl selectors.

PointSelector([n_features_to_select, ...])

Base class for feature selection methods that select features independently.

IntervalSelector([n_intervals_to_select, ...])

Base class for feature selection methods that select consecutive chunks (intervals) of features.

Convertible()

Selectors subclassing PointSelector, which provide a global score for each feature, can be made eligible for a PointSelector to IntervalSelector conversion facilitated by PseudoIntervalSelector by inheriting from this class.

Wavelength Point Selection

PointSelector([n_features_to_select, ...])

Base class for feature selection methods that select features independently.

CARS([n_features_to_select, n_cars_runs, ...])

Feature selection with Competitive Adaptive Reweighted Sampling (CARS).

MCUVE([n_features_to_select, n_subsets, ...])

Feature selection with Monte Carlo Uninformative Variable Elimination.

RandomFrog([n_features_to_select, ...])

Feature selection with the Random Frog method.

SPA([n_features_to_select, n_cv_folds, pls, ...])

Feature selection with the Successive Projection Algorithm (SPA).

VIP([n_features_to_select, n_cv_folds, pls, ...])

Feature Selection with Variable Importance in Projection.

Wavelength Interval Selection

IntervalSelector([n_intervals_to_select, ...])

Base class for feature selection methods that select consecutive chunks (intervals) of features.

IPLS([n_intervals_to_select, ...])

Interval selection with Interval Partial Least Squares (iPLS).

FiPLS([n_intervals_to_select, ...])

Feature Selection with Forward interval Partial Least Squares (FiPLS).

BiPLS([n_intervals_to_select, ...])

Feature Selection with Backward interval Partial Least Squares (BiPLS).

IntervalRandomFrog([n_intervals_to_select, ...])

Feature selection with the Interval Random Frog (iRF) method.

PseudoIntervalSelector(selector[, ...])

PseudoIntervalSelector transforms a PointSelector subclassing Convertible into an IntervalSelector.

Utilities

optimize_intervals(n_intervals, ...)

The algorithm calculates the optimal non-overlapping placement of n_intervals of width interval_width into the range of features.

util.get_coef_from_pls(pls)

Retrieves the coef attribute from the PLS model in the shape (n_targets, n_features) without triggering a FutureWarning.

Benchmarking API

Benchmarking

benchmarking.benchmark(data, features, methods)

Function performing benchmarking of Interval- and PointSelector feature selectors across different datasets and different parameterizations of the selectors.

Data Handling

benchmarking.load_data_handler(file_path)

Function to load a pickled instance of DataHandler.

benchmarking.DataHandler(datasets, methods, ...)

Data handling class corralling data generated by the benchmarking of different wavelength selection methods.

benchmarking.util.helpers.Selection([...])

Helper class allowing the handling of lists of different lengths in a single pandas DataFrame.

Plotting

benchmarking.plot_score(pod[, dataset, ...])

Plot regression scores of selectors across different number of selected features as box or bar plot.

benchmarking.plot_stability(pod[, dataset, ...])

Plots the stability score of methods for a given metric.

benchmarking.plot_score_vs_stability(pod[, ...])

Plotting a boxplot for the benchmarked methods displaying

benchmarking.plot_selection(pod, n_features)

Plots the selection probability for features of different selectors.

benchmarking.plot_exec_time(pod[, dataset, ...])

Plots execution times of selectors across different number of features to be selected.

Stability Metrics

benchmarking.util.metrics.StabilityScore(...)

Base class for all stability scores useable by the benchmarking system

benchmarking.util.metrics.PairwiseStabilityScore(...)

The class provides the infrastructure for the introduction of new symmetric and pairwise defined stability metrics.

benchmarking.util.metrics.DengScore([...])

Wraps the calculation of the selection stability score for randomized selection methods, according to Deng et al. [R0e48a2638659-1].

benchmarking.util.metrics.ZucknickScore([...])

Wraps the calculation of the stability score according to Zucknick et al. [R00428e8dc090-1].

Misc

benchmarking.util.helpers.load_data_handler(...)

Function to load a pickled instance of DataHandler.