Clip#
- class sdm.processing.numerical.Clip(min_value: float, max_value: float, *, method: Literal['saturate', 'hard'] = 'hard')#
Bases:
Processor,InvertibleMixinClip numerical values to a fixed interval.
With
method="hard", values are clamped to the interval. Withmethod="saturate", values are mapped smoothly into the interval:\[y = \frac{x}{\sqrt{1 + (x / b)^2}}\]where \(b\) is
max_valueandmin_valuemust equal-max_value. NaN is preserved and infinities map to the endpoints. Inverse transformation leaves values unchanged.- Parameters:
min_value (float) – Inclusive lower bound for every numerical value.
max_value (float) – Inclusive upper bound for every numerical value.
method (Literal['saturate', 'hard']) –
"hard"clamps to the bounds;"saturate"approaches finite, nonzero symmetric bounds smoothly and also changes interior values.
Capabilities#
Handled Semantic Types |
|
Requires Fitting |
❌ |