spectrochempy.Pipeline๏ƒ

class Pipeline(steps)[source]๏ƒ

Linear composition of allowlisted SpectroChemPy preprocessing and estimators.

The supplied steps are templates. Calling fit clones those templates, fits the clones, and exposes fitted runtime state through fitted_steps_ and fitted_named_steps_.

Attributes Summary

fitted_named_steps_

Return a read-only mapping of fitted step names to fitted steps.

fitted_steps_

Return ordered fitted (name, step) pairs.

named_steps

Return a read-only mapping of template step names to steps.

steps

Return ordered template (name, step) pairs.

Methods Summary

fit(X[,ย y])

Fit the pipeline on X and optional supervised target y.

fit_transform(X[,ย y])

Fit the pipeline and transform X with the fitted pipeline.

get_params([deep])

Return template configuration parameters.

predict(X)

Predict from X with an estimator-final fitted pipeline.

score(X[,ย y])

Score predictions from X against y with a fitted final estimator.

set_params(**params)

Transactionally update template steps or nested template parameters.

transform(X)

Transform X with a transformer-final fitted pipeline.

Attributes Documentation

fitted_named_steps_๏ƒ

Return a read-only mapping of fitted step names to fitted steps.

fitted_steps_๏ƒ

Return ordered fitted (name, step) pairs.

named_steps๏ƒ

Return a read-only mapping of template step names to steps.

steps๏ƒ

Return ordered template (name, step) pairs.

Methods Documentation

fit(X, y=None)[source]๏ƒ

Fit the pipeline on X and optional supervised target y.

Intermediate preprocessing transformers receive only the current dataset. A supervised final estimator receives the transformed dataset and y.

fit_transform(X, y=None)[source]๏ƒ

Fit the pipeline and transform X with the fitted pipeline.

get_params(deep=True)[source]๏ƒ

Return template configuration parameters.

With deep=True, each template is exposed under its step name and its constructor parameters under step__parameter keys.

predict(X)[source]๏ƒ

Predict from X with an estimator-final fitted pipeline.

score(X, y=None)[source]๏ƒ

Score predictions from X against y with a fitted final estimator.

set_params(**params)[source]๏ƒ

Transactionally update template steps or nested template parameters.

transform(X)[source]๏ƒ

Transform X with a transformer-final fitted pipeline.

Examples using spectrochempy.Pipeline