mirror of
https://github.com/Tencent/Metis.git
synced 2025-12-25 19:52:49 +00:00
fix(tsd_common): fix normalize problem
This commit is contained in:
parent
e21a00bcd4
commit
1a8eab9ec5
|
|
@ -90,6 +90,7 @@ def normalize_time_series_by_max_min(split_time_series):
|
|||
time_series = split_time_series[0] + split_time_series[1][1:] + split_time_series[2] + split_time_series[3][1:] + split_time_series[4]
|
||||
max_value = np.max(time_series)
|
||||
min_value = np.min(time_series)
|
||||
normalized_time_series = [0.0]*len(time_series)
|
||||
if max_value - min_value > 0:
|
||||
normalized_time_series = list((np.array(time_series) - min_value) / float(max_value - min_value))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue