(self, data, fit_config=None)
return transform_data
Transform input data using scale with fit results
        Parameters
        ----------
        data: data_instance, input data
        fit_config: list, the fit results information of scale

        Returns
        ----------
        transform_data:data_instance, data after transform
Transform input data using scale with fit results
        Parameters
        ----------
        data: data_instance, input data
        fit_config: list, the fit results information of scale
Transform input data using scale with fit results Parameters ---------- data : data_instance input data fit_config : list the fit results information of scale
def transform(self, data, fit_config=None):
        """
        Transform input data using scale with fit results
        Parameters
        ----------
        data: data_instance, input data
        fit_config: list, the fit results information of scale

        Returns
        ----------
        transform_data:data_instance, data after transform
        """
        LOGGER.info("Start scale data transform ...")

        if self.model_param.method == consts.MINMAXSCALE:
            self.scale_obj = MinMaxScale(self.model_param)
        elif self.model_param.method == consts.STANDARDSCALE:
            self.scale_obj = StandardScale(self.model_param)
            self.scale_obj.set_param(self.mean, self.std)
        else:
            LOGGER.info("DataTransform method is {}, do nothing and return!".format(self.model_param.method))

        if self.scale_obj:
            self.scale_obj.header = self.header
            self.scale_obj.scale_column_idx = self.scale_column_idx
            self.scale_obj.set_column_range(self.column_max_value, self.column_min_value)
            transform_data = self.scale_obj.transform(data)
            transform_data.schema = data.schema

            self.callback_meta(metric_name="scale", metric_namespace="train",
                               metric_meta=MetricMeta(name="scale", metric_type="SCALE",
                                                      extra_metas={"method": self.model_param.method}))

        else:
            transform_data = data

        LOGGER.info("End transform data.")

        return transform_data
def transform ( self , data , fit_config = None ) : LOGGER . info ( "Start scale data transform ..." ) if self . model_param . method == consts . MINMAXSCALE : self . scale_obj = MinMaxScale ( self . model_param ) elif self . model_param . method == consts . STANDARDSCALE : self . scale_obj = StandardScale ( self . model_param ) self . scale_obj . set_param ( self . mean , self . std ) else : LOGGER . info ( "DataTransform method is {}, do nothing and return!" . format ( self . model_param . method ) ) if self . scale_obj : self . scale_obj . header = self . header self . scale_obj . scale_column_idx = self . scale_column_idx self . scale_obj . set_column_range ( self . column_max_value , self . column_min_value ) transform_data = self . scale_obj . transform ( data ) transform_data . schema = data . schema self . callback_meta ( metric_name = "scale" , metric_namespace = "train" , metric_meta = MetricMeta ( name = "scale" , metric_type = "SCALE" , extra_metas = { "method" : self . model_param . method } ) ) else : transform_data = data LOGGER . info ( "End transform data." ) return transform_data