nirs4all-lite¶
nirs4all-lite is the portable aggregate distribution of the nirs4all
ecosystem. It is a thin portability layer that exposes the same upstream
capabilities across Rust, Python, R, MATLAB/Octave, and JavaScript/WASM from
one canonical package surface — without becoming a second implementation of
parsing, datasets, ML orchestration, or numerical methods.
What it re-exports¶
nirs4all-lite aggregates exactly six upstream libraries and delegates all real
work to them:
dag-ml— reproducible, OOF/leakage-safe ML coordinator.dag-ml-data— typed, sample-aligned multi-source data contracts.nirs4all-formats— Rust readers for NIRS/spectroscopy vendor file formats.nirs4all-io— dataset assembly bridge to aSpectroDataset.nirs4all-datasets— curated, DOI-pinned NIRS dataset catalog.nirs4all-methods— portable C-ABI PLS/NIRS numerical engine (libn4m).
Each binding exposes these upstream domains directly as formats, io,
datasets, methods, dag_ml, and dag_ml_data.
Important
It only re-exports. nirs4all-lite must never add a parser, estimator,
numerical kernel, dataset catalog, or DAG compiler of its own. The upstream
projects remain the single source of truth; this repository provides only a
canonical package surface, native bindings, release glue, and parity checks.
Package names¶
The Python distribution keeps the name nirs4all-lite (imported as
nirs4all_lite) so it does not collide with the full Python nirs4all library.
Every other binding uses nirs4all.
Target |
External name |
Import / module name |
|---|---|---|
Python |
|
|
Rust |
|
|
JavaScript/WASM |
|
|
R |
|
|
MATLAB/Octave |
|
|
Note
This is the portable aggregate distribution. It is not nirs4all-web (the
standalone browser/WASM client) and not nirs4all-studio (the desktop/web
app). Those are separate projects that consume parts of this stack.
How the pieces fit¶
nirs4all-lite is the seam where the low-level ecosystem becomes one portable
surface. The aggregate composes upstream domains — it does not reimplement them:
nirs4all-formats ─┐
nirs4all-io ──────┤
nirs4all-datasets ┤──► nirs4all-lite ──► Python / Rust / R / MATLAB-Octave / JS-WASM
nirs4all-methods ─┤ (aggregate surface, (one idiomatic API per host)
dag-ml ───────────┤ parity gates, release
dag-ml-data ──────┘ glue — no new logic)
The portable pipeline subset (Kennard-Stone, SNV, Savitzky-Golay, and a PLS
component sweep) is parsed from the same JSON/YAML definition envelope used by
the full Python nirs4all, then executed through nirs4all-methods and compared
against the full Python nirs4all oracle in every binding. See
Parity Strategy for the parity strategy and gates.
Getting started
Architecture
The nirs4all ecosystem¶
Main Python modelling library — pipelines, SpectroDataset, predictions.
Rust readers for ~58 NIRS/spectroscopy file formats (re-exported).
Dataset-assembly bridge → SpectroDataset (re-exported).
Curated DOI-pinned NIRS dataset catalog (re-exported).
Portable C-ABI PLS/NIRS engine, libn4m (re-exported).
Reproducible, OOF/leakage-safe ML coordinator (re-exported).
Typed sample-aligned multi-source data contracts (re-exported).