API Reference
Complete API documentation for FoodSpec Python modules with auto-generated signatures and examples.
Module Organization
Data Management
| Module |
Purpose |
Key Components |
| Core |
Data structures and workflows |
FoodSpectrumSet, Spectrum, OutputBundle |
| IO |
Loading and saving data |
load_folder(), read_spectra(), detect_format() |
| Datasets |
Bundled example data |
load_olive_oils(), load_meat_samples() |
Data Processing
| Module |
Purpose |
Key Components |
| Preprocessing |
Spectral preprocessing |
baseline_als(), normalize_snv() |
| Features |
Feature extraction |
detect_peaks(), RatioQualityEngine |
Analysis & Modeling
| Module |
Purpose |
Key Components |
| Chemometrics |
PCA, PLS, MCR-ALS |
run_pca(), make_pls_da() |
| ML |
Model training & validation |
nested_cross_validate() |
| Stats |
Hypothesis testing |
run_ttest(), run_anova() |
| Metrics |
Evaluation metrics |
compute_classification_metrics() |
Applications
| Module |
Purpose |
Key Components |
| Workflows |
High-level workflows |
Domain-specific analysis |
See Also