nirs4all.pipeline.dagml.target_capture module
Target-output transforms attached only to captured host artifacts.
Training and native scoring operate in the dataset’s numeric target space.
Exported predictors additionally need to restore the labels supplied by the
user. Keeping that decoder outside the runtime y_processing transform
prevents decoded labels from leaking back into DAG score blocks.
- class nirs4all.pipeline.dagml.target_capture.CapturedTargetTransform(transformer: Any, decoder: Any)[source]
Bases:
TransformerMixin,BaseEstimatorCompose an optional model-target transform with a fitted label decoder.
- fit_transform(y: Any, *_args: Any, **_kwargs: Any) Any[source]
Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
- Parameters:
X (array-like of shape (n_samples, n_features)) – Input samples.
y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
**fit_params (dict) – Additional fit parameters. Pass only if the estimator accepts additional params in its fit method.
- Returns:
X_new – Transformed array.
- Return type:
ndarray array of shape (n_samples, n_features_new)