Skip to content

Commit

Permalink
fix bugs: min-max scale公式错误修改
Browse files Browse the repository at this point in the history
Signed-off-by: 张辉 <[email protected]>
  • Loading branch information
lvying0019 authored and 张辉 committed Mar 7, 2024
1 parent fe7674c commit d419e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/fate/ml/preprocessing/feature_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d419e7e

Please sign in to comment.