예제 #1
0
파일: min_max_scale.py 프로젝트: zpskt/FATE
    def _get_param(self):
        min_max_scale_param_dict = {}
        if self.header:
            for i, header in enumerate(self.header):
                if i in self.scale_column_idx:
                    param_obj = ColumnScaleParam(column_upper=self.column_max_value[i],
                                                 column_lower=self.column_min_value[i])
                    min_max_scale_param_dict[header] = param_obj

        param_proto_obj = ScaleParam(col_scale_param=min_max_scale_param_dict,
                                     header=self.header)
        return param_proto_obj
예제 #2
0
    def __get_param(self):
        column_scale_param_dict = {}
        if self.header:
            for i, header in enumerate(self.header):
                if i in self.scale_column_idx:
                    param_obj = ColumnScaleParam(
                        column_upper=np.round(self.column_max_value[i],
                                              self.round_num),
                        column_lower=np.round(self.column_min_value[i],
                                              self.round_num),
                        mean=np.round(self.mean[i], self.round_num),
                        std=np.round(self.std[i], self.round_num))
                    column_scale_param_dict[header] = param_obj

        param_proto_obj = ScaleParam(col_scale_param=column_scale_param_dict,
                                     header=self.header)
        return param_proto_obj