xpectra
Guide
Installation
Requirements
From PyPI
Optional extras
From source (editable)
Verify the install
Quickstart
1. Build the processed data
2. Load labeled and unlabeled spectra
3. Calibrate a classifier (leakage-safe)
4. Measure the generalization gap (LOSO)
5. Detect out-of-distribution spectra and abstain
6. Weathering indicator
Preprocessing routes & the route-prefix convention
The three routes
Selecting a route
The route-prefix convention
Reference
Command-line interface
xpectra-process-raw
xpectra-train
xpectra-predict
xpectra-study
Study reproduction workflows
Workflow catalog
Route selection
Dependencies between workflows
Reference datasets
API reference
Configuration & data
xpectra.TrustConfig
xpectra.load_labeled
xpectra.load_unknown
xpectra.load_external
xpectra.loso_splits
xpectra.leave_one_class_out
Metrics
xpectra.expected_calibration_error
xpectra.multiclass_brier
xpectra.risk_coverage
xpectra.aurc
xpectra.selective_metrics_at_coverage
Calibration
xpectra.CalibratedModel
xpectra.TemperatureScaler
xpectra.reliability_curve
Out-of-distribution detection & abstention
xpectra.AbstainingClassifier
xpectra.MaxSoftmax
xpectra.Entropy
xpectra.Energy
xpectra.Mahalanobis
xpectra.KNNDistance
xpectra.SpectralAngleScorer
Semi-supervised learning
xpectra.self_train
xpectra.label_spread
xpectra.ssl_loso_experiment
Weathering analysis
xpectra.band_area
xpectra.carbonyl_index
xpectra.weathering_report
xpectra.unknown_composition
Module index
xpectra.config
xpectra.data
xpectra.metrics
xpectra.calibration
xpectra.ood
xpectra.ssl
xpectra.weathering
xpectra.protocols
xpectra.plotting
xpectra.pipeline
Project
Changelog
0.1.1
0.1.0
xpectra
Index
Edit on GitHub
Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
I
|
K
|
L
|
M
|
N
|
O
|
P
|
R
|
S
|
T
|
U
|
W
|
X
_
__init__() (xpectra.AbstainingClassifier method)
(xpectra.CalibratedModel method)
(xpectra.Energy method)
(xpectra.Entropy method)
(xpectra.KNNDistance method)
(xpectra.Mahalanobis method)
(xpectra.MaxSoftmax method)
(xpectra.SpectralAngleScorer method)
(xpectra.TemperatureScaler method)
(xpectra.TrustConfig method)
A
ABSTAIN (xpectra.AbstainingClassifier attribute)
(xpectra.ood.AbstainingClassifier attribute)
AbstainingClassifier (class in xpectra)
(class in xpectra.ood)
achieved_coverage() (xpectra.AbstainingClassifier method)
(xpectra.ood.AbstainingClassifier method)
add_noise() (in module xpectra.ood)
align_features_to_artifact() (in module xpectra.pipeline.core)
artifact_matches() (in module xpectra.pipeline.core)
artifact_path() (in module xpectra.pipeline.core)
aurc() (in module xpectra)
(in module xpectra.metrics)
available_models() (in module xpectra.pipeline.core)
B
band_area() (in module xpectra)
(in module xpectra.weathering)
baseline_drift() (in module xpectra.ood)
baseline_method (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
block_scramble() (in module xpectra.ood)
build_processed_routes() (in module xpectra.pipeline.build_db)
build_routes() (in module xpectra.pipeline.build_db)
C
cache_dir (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
CalibratedModel (class in xpectra)
(class in xpectra.calibration)
calibration_methods (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
carbonyl_band (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
carbonyl_index() (in module xpectra)
(in module xpectra.weathering)
ci_boxplot() (in module xpectra.plotting)
ci_vs_confidence() (in module xpectra.plotting)
combine_method (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
combine_normalized_to_grid() (in module xpectra.pipeline.core)
config_with_overrides() (in module xpectra.pipeline.core)
cv_folds (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
D
dedupe_spectra (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
denoising_method (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
derivative_delta (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
derivative_polyorder (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
derivative_route_dataframe() (in module xpectra.pipeline.core)
derivative_window_length (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
descending (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
duplicate_report() (in module xpectra.pipeline.build_db)
E
ece_bins (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
Energy (class in xpectra)
(class in xpectra.ood)
ensure_dirs() (xpectra.config.TrustConfig method)
(xpectra.TrustConfig method)
ensure_prediction_metadata() (in module xpectra.pipeline.core)
Entropy (class in xpectra)
(class in xpectra.ood)
evaluate_holdout() (in module xpectra.pipeline.core)
exclude_regions (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
expected_calibration_error() (in module xpectra)
(in module xpectra.metrics)
external_studies (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
F
figures_dir (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
fit() (xpectra.CalibratedModel method)
(xpectra.calibration.CalibratedModel method)
(xpectra.calibration.TemperatureScaler method)
(xpectra.Energy method)
(xpectra.Entropy method)
(xpectra.KNNDistance method)
(xpectra.Mahalanobis method)
(xpectra.MaxSoftmax method)
(xpectra.ood.Energy method)
(xpectra.ood.Entropy method)
(xpectra.ood.KNNDistance method)
(xpectra.ood.Mahalanobis method)
(xpectra.ood.MaxSoftmax method)
(xpectra.ood.OODScorer method)
(xpectra.ood.SpectralAngleScorer method)
(xpectra.SpectralAngleScorer method)
(xpectra.TemperatureScaler method)
fit_final_model() (in module xpectra.pipeline.core)
fit_tau() (xpectra.AbstainingClassifier method)
(xpectra.ood.AbstainingClassifier method)
flat_windows (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
force_absorbance_input() (in module xpectra.pipeline.core)
G
gap_barplot() (in module xpectra.plotting)
get_estimator() (in module xpectra.protocols)
I
interpolate_method (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
interpolate_regions (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
is_wavenumber_column() (in module xpectra.pipeline.core)
K
knn_k (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
KNNDistance (class in xpectra)
(class in xpectra.ood)
L
label_column (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
label_spread() (in module xpectra)
(in module xpectra.ssl)
label_spread_neighbors (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
labeled_studies (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
leave_one_class_out() (in module xpectra)
(in module xpectra.data)
load_artifacts() (in module xpectra.pipeline)
(in module xpectra.pipeline.core)
load_dataset_frame() (in module xpectra.pipeline.build_db)
load_external() (in module xpectra)
(in module xpectra.data)
load_labeled() (in module xpectra)
(in module xpectra.data)
load_training_dataframe() (in module xpectra.pipeline.core)
load_unknown() (in module xpectra)
(in module xpectra.data)
loso_splits() (in module xpectra)
(in module xpectra.data)
M
Mahalanobis (class in xpectra)
(class in xpectra.ood)
make_artifact() (in module xpectra.pipeline.core)
make_base_pipeline() (in module xpectra.calibration)
make_prediction_route_dataframes() (in module xpectra.pipeline)
(in module xpectra.pipeline.core)
map_polymer_type() (in module xpectra.pipeline.core)
MaxSoftmax (class in xpectra)
(class in xpectra.ood)
metadata_frame() (in module xpectra.pipeline.core)
model_names (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
module
xpectra.calibration
xpectra.config
xpectra.data
xpectra.metrics
xpectra.ood
xpectra.pipeline
xpectra.pipeline.build_db
xpectra.pipeline.config
xpectra.pipeline.core
xpectra.plotting
xpectra.protocols
xpectra.ssl
xpectra.weathering
multiclass_brier() (in module xpectra)
(in module xpectra.metrics)
N
n_jobs (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
name (xpectra.Energy attribute)
(xpectra.Entropy attribute)
(xpectra.KNNDistance attribute)
(xpectra.Mahalanobis attribute)
(xpectra.MaxSoftmax attribute)
(xpectra.ood.Energy attribute)
(xpectra.ood.Entropy attribute)
(xpectra.ood.KNNDistance attribute)
(xpectra.ood.Mahalanobis attribute)
(xpectra.ood.MaxSoftmax attribute)
(xpectra.ood.OODScorer attribute)
(xpectra.ood.SpectralAngleScorer attribute)
(xpectra.SpectralAngleScorer attribute)
normalization_method (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
normalize_routes() (in module xpectra.pipeline.core)
O
OODScorer (class in xpectra.ood)
P
pca_components_ood (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
pca_components_ssl (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
predict() (xpectra.AbstainingClassifier method)
(xpectra.CalibratedModel method)
(xpectra.calibration.CalibratedModel method)
(xpectra.ood.AbstainingClassifier method)
predict_csv() (in module xpectra.pipeline)
(in module xpectra.pipeline.core)
predict_proba() (xpectra.CalibratedModel method)
(xpectra.calibration.CalibratedModel method)
predict_with_artifact() (in module xpectra.pipeline.core)
preprocess_raw_dataframe() (in module xpectra.pipeline.core)
PreprocessConfig (class in xpectra.pipeline)
(class in xpectra.pipeline.config)
processed_dir (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
R
random_state (xpectra.config.TrustConfig attribute)
(xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
(xpectra.TrustConfig attribute)
read_csv() (in module xpectra.pipeline.core)
read_external_frames() (in module xpectra.pipeline.build_db)
read_frames() (in module xpectra.pipeline.build_db)
reference_band (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
reliability_curve() (in module xpectra)
(in module xpectra.calibration)
reliability_diagram() (in module xpectra.plotting)
resolution (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
results_dir (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
risk_coverage() (in module xpectra)
(in module xpectra.metrics)
risk_coverage_plot() (in module xpectra.plotting)
routes (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
run_calibration_eval() (in module xpectra.protocols)
run_generalization() (in module xpectra.protocols)
S
safe_name() (in module xpectra.pipeline)
(in module xpectra.pipeline.core)
sample_id_column (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
score() (xpectra.Energy method)
(xpectra.Entropy method)
(xpectra.KNNDistance method)
(xpectra.Mahalanobis method)
(xpectra.MaxSoftmax method)
(xpectra.ood.Energy method)
(xpectra.ood.Entropy method)
(xpectra.ood.KNNDistance method)
(xpectra.ood.Mahalanobis method)
(xpectra.ood.MaxSoftmax method)
(xpectra.ood.OODScorer method)
(xpectra.ood.SpectralAngleScorer method)
(xpectra.SpectralAngleScorer method)
select_models() (in module xpectra.pipeline.core)
selective_metrics_at_coverage() (in module xpectra)
(in module xpectra.metrics)
self_train() (in module xpectra)
(in module xpectra.ssl)
self_train_max_iter (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
self_train_threshold (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
set_score_request() (xpectra.CalibratedModel method)
(xpectra.calibration.CalibratedModel method)
spectral_columns_sorted() (in module xpectra.pipeline.core)
SpectralAngleScorer (class in xpectra)
(class in xpectra.ood)
ssl_loso_experiment() (in module xpectra)
(in module xpectra.ssl)
T
target_coverage (xpectra.config.TrustConfig attribute)
(xpectra.TrustConfig attribute)
tau_ (xpectra.ood.AbstainingClassifier attribute)
TemperatureScaler (class in xpectra)
(class in xpectra.calibration)
test_size (xpectra.config.TrustConfig attribute)
(xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
(xpectra.TrustConfig attribute)
to_dict() (xpectra.pipeline.config.PreprocessConfig method)
(xpectra.pipeline.PreprocessConfig method)
train_route() (in module xpectra.pipeline.core)
train_routes() (in module xpectra.pipeline)
(in module xpectra.pipeline.core)
training_arrays() (in module xpectra.pipeline.core)
transform() (xpectra.calibration.TemperatureScaler method)
(xpectra.TemperatureScaler method)
TrustConfig (class in xpectra)
(class in xpectra.config)
U
umap_overlay() (in module xpectra.plotting)
unknown_composition() (in module xpectra)
(in module xpectra.weathering)
unknown_study (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
W
weathering_report() (in module xpectra)
(in module xpectra.weathering)
wn_max (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
wn_min (xpectra.pipeline.config.PreprocessConfig attribute)
(xpectra.pipeline.PreprocessConfig attribute)
write_routes() (in module xpectra.pipeline.build_db)
X
xpectra.calibration
module
xpectra.config
module
xpectra.data
module
xpectra.metrics
module
xpectra.ood
module
xpectra.pipeline
module
xpectra.pipeline.build_db
module
xpectra.pipeline.config
module
xpectra.pipeline.core
module
xpectra.plotting
module
xpectra.protocols
module
xpectra.ssl
module
xpectra.weathering
module