(data, max_value_list, min_value_list, scale_value_list, process_cols_list)
return _data
Scale operator for each column. The input data type is data_instance
Scale operator for each column. The input data type is data_instance
Scale operator for each column . The input data type is data_instance
def __scale(data, max_value_list, min_value_list, scale_value_list, process_cols_list):
        """
        Scale operator for each column. The input data type is data_instance
        """
        features = np.array(data.features, dtype=float)
        for i in process_cols_list:
            value = features[i]
            if value > max_value_list[i]:
                value = max_value_list[i]
            elif value < min_value_list[i]:
                value = min_value_list[i]

            features[i] = (value - min_value_list[i]) / scale_value_list[i]
        _data = copy.deepcopy(data)
        _data.features = copy.deepcopy(features)
        return _data
def __scale ( data , max_value_list , min_value_list , scale_value_list , process_cols_list ) : features = np . array ( data . features , dtype = float ) for i in process_cols_list : value = features [ i ] if value > max_value_list [ i ] : value = max_value_list [ i ] elif value < min_value_list [ i ] : value = min_value_list [ i ] features [ i ] = ( value - min_value_list [ i ] ) / scale_value_list [ i ] _data = copy . deepcopy ( data ) _data . features = copy . deepcopy ( features ) return _data