MinMax#

class reservoirflow.scalers.MinMax(output_range: tuple, input_range: tuple | None = None)#

Bases: Scaler

MinMax scaler class.

This scaler is used to scale input data based on output_range=(min,max). If input_range is set to None instead of input_range=(min,max), then input_range is inferred based on input data.

Hint

Using input_range=(min,max) is useful in some cases to match the scaling with other solutions when input_range can’t be inferred from input data (e.g. unstable solution).

Note

Note that if the input array has multiple feature each with its own range (not unified), then using input_range=None is required to infer input_range for each feature.

Returns:

Scaler object.

Return type:

Scaler

Construct scaler object.

Parameters:
  • output_range (tuple, optional) – output range used in the transformation.

  • input_range (tuple, optional) – input range used in the transformation.

Attributes

name

Class name.

Methods

fit(v[, axis])

Fit scaler with input values.

fit_transform(v[, axis])

Fit scaler and transform input based on output range.

inverse_transform(vbar)

Transform input back to the original (input) range.

set_output_range(output_range)

Set output range for the scaler.

transform(v)

Transform input based on output range.


Comments 💬#

Feel free to make a comment, ask a question, or share your opinion about this specific content. Please keep in mind the Commenting Guidelines ⚖.