(self, data)
return fit_data
Apply scale for input data
        Parameters
        ----------
        data: data_instance, input data

        Returns
        ----------
        data:data_instance, data after scale
        scale_value_results: list, the fit results information of scale
Apply scale for input data
        Parameters
        ----------
        data: data_instance, input data
Apply scale for input data Parameters ---------- data : data_instance input data
def fit(self, data):
        """
        Apply scale for input data
        Parameters
        ----------
        data: data_instance, input data

        Returns
        ----------
        data:data_instance, data after scale
        scale_value_results: list, the fit results information of scale
        """
        LOGGER.info("Start scale data fit ...")

        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)
        else:
            LOGGER.warning("Scale method is {}, do nothing and return!".format(self.model_param.method))

        if self.scale_obj:
            fit_data = self.scale_obj.fit(data)
            fit_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}))
            
            LOGGER.info("start to get model summary ...")
            self.set_summary(self.scale_obj.get_model_summary())
            LOGGER.info("Finish getting model summary.")

        else:
            fit_data = data

        LOGGER.info("End fit data ...")
        return fit_data
def fit ( self , data ) : LOGGER . info ( "Start scale data fit ..." ) 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 ) else : LOGGER . warning ( "Scale method is {}, do nothing and return!" . format ( self . model_param . method ) ) if self . scale_obj : fit_data = self . scale_obj . fit ( data ) fit_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 } ) ) LOGGER . info ( "start to get model summary ..." ) self . set_summary ( self . scale_obj . get_model_summary ( ) ) LOGGER . info ( "Finish getting model summary." ) else : fit_data = data LOGGER . info ( "End fit data ..." ) return fit_data