class_docstr: Transform data by scaling features to given feature range.
  Note that if `strict_range` is set, transformed values will always be within given range,
  regardless whether transform data exceeds training data value range (as in 1.x ver)
  
  The transformation is given by::
      X_scaled = (X - X.min()) / (X.max() - X.min()) * feature_range + feature_range_min
               = (X - X.min()) * (feature_range / (X.max() - X.min()) + feature_range_min
class_docstr_tok: ["Transform","data","by","scaling","features","to","given","feature","range",".","Note","that","if","`","strict_range","`","is","set",",","transformed","values","will","always","be","within","given","range",",","regardless","whether","transform","data","exceeds","training","data","value","range","(","as","in","1.x","ver",")","The","transformation","is","given","by",":",":","X_scaled","=","(","X","-","X.min","(",")",")","\/","(","X.max","(",")","-","X.min","(",")",")","*","feature_range","+","feature_range_min","=","(","X","-","X.min","(",")",")","*","(","feature_range","\/","(","X.max","(",")","-","X.min","(",")",")","+","feature_range_min"]
docstr: Transformation is given by:
      X_scaled = (X * scale - scale_min) + feature_range_min
  where scale = feature_range / (X_train.max() - X_train.min()) and scale_min = X_train.min() * scale
docstr_tok: ["Transformation","is","given","by",":","X_scaled","=","(","X","*","scale","-","scale_min",")","+","feature_range_min","where","scale","=","feature_range","\/","(","X_train.max","(",")","-","X_train.min","(",")",")","and","scale_min","=","X_train.min","(",")","*","scale"]
code: def transform(self, ctx: Context, test_data):
      """
      Transformation is given by:
          X_scaled = (X * scale - scale_min) + feature_range_min
      where scale = feature_range / (X_train.max() - X_train.min()) and scale_min = X_train.min() * scale
  
      """
      test_data_select = test_data[self.select_col]
  
      data_scaled = test_data_select * self._scale - (
          self._scale_min + self._range_min
      )
      if self.strict_range:
          # restrict feature output within given feature value range
          data_scaled = data_scaled[
              data_scaled >= self._range_min
          ].fillna(self._range_min)
          data_scaled = data_scaled[
              data_scaled <= self._range_max
          ].fillna(self._range_max)
      test_data[self.select_col] = data_scaled
      return test_data
  
imports: import logging
  import pandas
  from fate.arch import Context
  from ..abc.module import Module
label_desc: Use image node_id 3 for calling the MinMaxScaler obj's underlying member method code with example usage: obj.transform(ctx, test_data) and returns: test_data