Skip to content

Commit

Permalink
algo: make re use resource total instead of average as resource histo…
Browse files Browse the repository at this point in the history
…ry input

Signed-off-by: Zach Zhu <zzqshu@126.com>
  • Loading branch information
zqzten committed Dec 14, 2023
1 parent 61c2d9f commit 1364020
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def train(self):

x_train = df_sample[features + [self.replicas_col, self.time_col] + ['weekday', 'minute']].copy()
x_train[features] = x_train[features].astype(float).div(x_train[self.replicas_col].values, axis=0)
y_train = df_sample[self.resource_col]
y_train = df_sample[self.resource_col].astype(float).div(x_train[self.replicas_col].values, axis=0)

x_train_trans = x_train[features].values

Expand Down Expand Up @@ -254,7 +254,7 @@ def test(self):

x_test = df_sample[features + [self.replicas_col, self.time_col] + ['weekday', 'minute']].copy()
x_test[features] = x_test[features].astype(float).div(x_test[self.replicas_col].values, axis=0)
y_test = df_sample[self.resource_col]
y_test = df_sample[self.resource_col].astype(float).div(x_test[self.replicas_col].values, axis=0)
self.future_ture = y_test

x_test_trans = x_test[features].values
Expand Down

0 comments on commit 1364020

Please sign in to comment.