filter_y_outlier — Y Outlier Filter

Group: Sample / feature filters · Binding: n4m.sklearn.YOutlierFilter · C ABI: n4m_filter_y_outlier_*

Description

Univariate outlier filter on the target vector y.

Full binding docstring
Univariate outlier filter on the target vector ``y``.

``method`` is one of ``"iqr"``, ``"zscore"``, ``"percentile"``, ``"mad"``.
Threshold semantics follow nirs4all's :class:`YOutlierFilter`:

* For ``"iqr"`` / ``"zscore"`` / ``"mad"``: ``threshold`` is the
  multiplier on the IQR / σ / MAD bounds.
* For ``"percentile"``: ``lower_percentile`` and ``upper_percentile``
  define the keep band.

Parameters

Name

Type

Default

method

str

'iqr'

threshold

float

1.5

lower_percentile

float

1.0

upper_percentile

float

99.0

Explanations

Bibliographic source

Standard spectroscopic operator — see the nirs4all preprocessing / augmentation handbook and the cited literature within the binding docstring.

Mathematical principle

Univariate outlier filter on the target vector y.

Implementation

C ABI n4m_filter_y_outlier_* in libn4m (create / apply / destroy lifecycle), wrapped by n4m.sklearn.YOutlierFilter. The same numerical kernel backs every language binding.

Usage

from n4m.sklearn import YOutlierFilter
op = YOutlierFilter()
X_transformed = op.fit_transform(X)

See also: methods index · interactive dashboard