Tutorials: Beginner β Advanced Learning Path¶
Step-by-step tutorials from first plots to reproducible pipelines, with proper validation and clear success criteria.
π― Learning Paths¶
Beginner (5β15 min each)¶
Get your first FoodSpec analysis running. No prior knowledge required.
| Tutorial | Time | What You'll Learn |
|---|---|---|
| Load Spectra & Plot | 5 min | Load CSV data, create basic plots, understand spectral format |
| Baseline Correction & Smoothing | 10 min | Clean noisy spectra using ALS baseline and SavitzkyβGolay smoothing |
| Simple Classification | 15 min | Classify oil types using PCA + logistic regression; visualize results |
Intermediate (20β40 min each)¶
Solve real-world problems with proper validation and domain knowledge.
| Tutorial | Time | What You'll Learn |
|---|---|---|
| Oil Authentication with Validation | 25 min | Cross-validation, confusion matrices, reproducible protocols |
| Domain Shift: Oil vs Chips | 35 min | Matrix effects, divergence analysis, marker stability across matrices |
| Stability Tracking | 30 min | Monitor degradation/aging using time series and QC metrics |
Advanced (45β90 min each)¶
Build reproducible, production-ready pipelines with experiment tracking.
| Tutorial | Time | What You'll Learn |
|---|---|---|
| Reproducible Pipelines with Configs | 45 min | YAML protocol design, version control, experiment tracking |
| Reference Workflow: Oil Authentication | 90 min | Canonical reproducible workflow; template for publications |
| HSI Surface Mapping | 60 min | Hyperspectral mapping and visualization |
π Supplementary Resources¶
- Examples Gallery β Practical, runnable examples
- End-to-End Notebooks β Interactive Jupyter notebooks
- Protocols & YAML β Deep dive into protocol configuration
- Troubleshooting Guide β Fix common errors
π Tutorial Template¶
Every tutorial in FoodSpec follows a consistent structure:
- Goal β What problem are we solving?
- Data β What data format and size do we need?
- Steps β High-level workflow overview
- Code β Copy-paste runnable Python/CLI examples
- Results β Expected outputs, plots, and metrics
- Interpretation β How to read the results
- Pitfalls β Common mistakes and how to avoid them
- Next Steps β What to learn next
π Quick Navigation¶
By Use Case¶
- Authenticate oils β Oil Authentication
- Handle matrix effects β Oil vs Chips
- Build a production pipeline β Reproducible Pipelines
- Map surfaces with HSI β HSI Surface Mapping
By Skill Level¶
- New to FoodSpec β Start with Beginner
- Comfortable with basics β Try Intermediate
- Publishing results β Dive into Advanced
β Prerequisites¶
Level 1¶
- Python 3.10+ installed
- FoodSpec installed:
pip install foodspec - ~10 minutes of your time
Level 2¶
- Complete Level 1 tutorials (or FoodSpec basics)
- Understanding of cross-validation and classification metrics
- Your own data (or use synthetic examples)
Level 3¶
- Complete Level 2 tutorials (or publication experience)
- Familiarity with YAML configuration
- Git for version control (recommended)
π Connection to Other Docs¶
- Getting Started β Installation and quickstarts
- Foundations β Data structures and key concepts
- Workflows β Domain-specific analysis patterns
- Theory & Background β Scientific principles
π‘ Tips for Success¶
- Type the code yourself (don't copy-paste) to build muscle memory
- Experiment with parameters β Change smoothing window size, regularization, etc.
- Check the troubleshooting section before asking for help
- Link to tutorials when sharing work β Shows your methodology is reproducible
- Join the community β GitHub Discussions
π Progressive Difficulty¶
Level 1 (Beginner) Level 2 (Applied) Level 3 (Advanced)
ββ Load spectra ββ Cross-validation ββ Experiment tracking
ββ Plot basics ββ Domain shift ββ Reproducible configs
ββ Simple classifier ββ Model comparison ββ Publication pipeline
β β β
5-15 min 20-40 min 45-90 min
No assumptions FoodSpec basics Production-ready
π― Success Criteria¶
After each level, you should be able to:
Level 1 Complete? β - [ ] Load your own CSV spectra - [ ] Preprocess and visualize them - [ ] Train and evaluate a simple classifier
Level 2 Complete? β - [ ] Validate models using cross-validation - [ ] Interpret metrics and confusion matrices - [ ] Identify domain shift issues
Level 3 Complete? β - [ ] Define protocols in YAML - [ ] Track experiments and versions - [ ] Generate publication-ready reports
π Got Stuck?¶
- Check the Pitfalls section in each tutorial
- See Troubleshooting FAQ
- Report an issue
Happy learning! π