Skip to main content

Module normalizer

Module normalizer 

Source
Expand description

Normalizer: scale each sample (row) to unit norm.

Unlike column-wise scalers, the Normalizer operates row-wise: each sample is scaled independently so that its chosen norm equals 1.

Supported norms:

  • L1: divide by the sum of absolute values
  • L2: divide by the Euclidean norm (default)
  • Max: divide by the maximum absolute value

Samples that already have a zero norm are left unchanged.

This transformer is stateless — no fitting is required. Call Transform::transform directly.

Structs§

Normalizer
A stateless row-wise normalizer.

Enums§

NormType
The norm used by Normalizer when scaling each sample.