Skip to content

Commit

Permalink
Merge pull request #84 from zqzten/algorithm
Browse files Browse the repository at this point in the history
Algo: Make replicas estimator use resource total instead of average as resource history input
  • Loading branch information
dayko2019 authored Dec 14, 2023
2 parents 57fe3e3 + 1364020 commit 414696c
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 414696c

Please sign in to comment.