From d419e7e7f8dd930193e89f118a80a531d732d435 Mon Sep 17 00:00:00 2001 From: Zhang Hui Date: Thu, 7 Mar 2024 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bugs:=20min-max=20scale=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张辉 --- python/fate/ml/preprocessing/feature_scale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/fate/ml/preprocessing/feature_scale.py b/python/fate/ml/preprocessing/feature_scale.py index e461c1a599..267e6450c1 100644 --- a/python/fate/ml/preprocessing/feature_scale.py +++ b/python/fate/ml/preprocessing/feature_scale.py @@ -133,7 +133,7 @@ def transform(self, ctx: Context, test_data): """ test_data_select = test_data[self.select_col] - data_scaled = test_data_select * self._scale - (self._scale_min + self._range_min) + 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)