repository
catalogue / dagml_snv_pls

dag-ml — SNV · Savitzky–Golay · PLS

The SNV/SG/PLS baseline expressed as a dag-ml pipeline DSL (nirs4all-compatible).

unvalidated

Overview

dag-ml — SNV · Savitzky–Golay · PLS

The robust SNV/SG/PLS regression baseline, expressed as a dag-ml pipeline DSL.

Why it exists

The repository serves both the nirs4all and dag-ml ecosystems through one storage envelope. This recipe is the dag-ml counterpart of snv_savgol_pls: the same preprocessing and PLS model, but authored as a dag-ml DSL that a dag-ml-aware runtime compiles into a graph + campaign template.

What it does

  1. SNV scatter correction.
  2. Savitzky–Golay first derivative (window_length=11, polyorder=2).
  3. Min–max scaling.
  4. Shuffle split (5 × 25 %) and a 12-component PLS model.

Provenance, content-addressing, and the cross-language contract are identical to the nirs4all recipes — only the recipe grammar differs.

Recipe

{
  "name": "dag-ml — SNV + Savitzky-Golay + PLS",
  "pipeline": [
    {"class": "nirs4all.operators.transforms.StandardNormalVariate"},
    {"class": "nirs4all.operators.transforms.SavitzkyGolay", "params": {"window_length": 11, "polyorder": 2, "deriv": 1}},
    {"class": "sklearn.preprocessing.MinMaxScaler"},
    {"split": {"class": "sklearn.model_selection.ShuffleSplit", "params": {"n_splits": 5, "test_size": 0.25, "random_state": 42}}},
    {"model": {"class": "sklearn.cross_decomposition.PLSRegression", "params": {"n_components": 12}}}
  ]
}

Use it

# Python
import nirs4all_repository as n4r
pipe = n4r.get("dagml_snv_pls")
config = pipe.to_nirs4all()  # ready for nirs4all.run() / predict()
# any language: read the index, fetch + verify
curl https://repository.nirs4all.org/data/index.json
curl https://repository.nirs4all.org/data/pipelines/dagml_snv_pls/pipeline.json

Metadata

framework
dag-ml
kind
recipe
task
regression
version
1.0.0
license
CeCILL-2.1 OR AGPL-3.0-or-later
trust
community
tags
pls, snv, savitzky_golay, dag_ml, baseline
authors
Gregory Beurier
reference
regression_demo

Expected metrics

no expected metrics

Provenance

Download

recipe
pipeline.json
descriptor
descriptor.yaml