repository
catalogue / msc_pls

MSC · PLS

Classic scatter-corrected PLS — Multiplicative Scatter Correction with a 10-component PLS regressor.

unvalidated

Overview

MSC · PLS

The classic near-infrared regression pipeline.

What it does

  1. Multiplicative Scatter Correction (MSC) — regresses each spectrum onto the mean

spectrum to remove scatter from particle size and path-length differences.

  1. Standardisation of features and target.
  2. PLS regression with 10 latent components, 5-fold KFold cross-validation.

When to use it

The default first choice for powdered or granular samples where scatter dominates. MSC and SNV are close cousins — try both; MSC is preferred when a stable reference spectrum is meaningful for your sample set.

Recipe

{
  "name": "MSC + PLS",
  "pipeline": [
    {"class": "nirs4all.operators.transforms.MultiplicativeScatterCorrection"},
    {"class": "sklearn.preprocessing.StandardScaler"},
    {"y_processing": {"class": "sklearn.preprocessing.StandardScaler"}},
    {"class": "sklearn.model_selection.KFold", "params": {"n_splits": 5, "shuffle": true, "random_state": 7}},
    {"model": {"class": "sklearn.cross_decomposition.PLSRegression", "params": {"n_components": 10}}, "name": "PLS-10"}
  ]
}

Use it

# Python
import nirs4all_repository as n4r
pipe = n4r.get("msc_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/msc_pls/pipeline.json

Metadata

framework
nirs4all
kind
recipe
task
regression
version
1.0.0
license
CeCILL-2.1 OR AGPL-3.0-or-later
trust
official
tags
pls, msc, scatter_correction, baseline
authors
Gregory Beurier
reference
regression_demo

Expected metrics

test · rmse0.16 ±0.04
val · rmse0.135 ±0.03
statusunvalidated

Provenance

Download

recipe
pipeline.json
descriptor
descriptor.yaml