From 57bee1523268aa6ba90a84ee9961c4537ad17ca7 Mon Sep 17 00:00:00 2001 From: Diana Jlailaty Date: Tue, 7 Dec 2021 09:05:45 +0000 Subject: [PATCH] Update prophet_forecaster.py --- forecasting_prophet/prophet_forecaster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forecasting_prophet/prophet_forecaster.py b/forecasting_prophet/prophet_forecaster.py index 9a8bff38..5520e586 100644 --- a/forecasting_prophet/prophet_forecaster.py +++ b/forecasting_prophet/prophet_forecaster.py @@ -65,12 +65,12 @@ def train(metric): for j in range(i + 1, (len(dataset[metric]) - 1)): if (dataset[metric][j] == "None" and dataset[metric][j + 1] != "None" and dataset[metric][j - 1] != "None"): myds.append(dataset['ems_time'][j]) - myy.append((dataset[metric][j - 1] + dataset[metric][j + 1]) / 2) + myy.append((float(dataset[metric][j - 1]) + (float(dataset[metric][j + 1]) )/ 2)) elif(dataset[metric][j] == "None" and (dataset[metric][j + 1] == "None" or dataset[metric][j - 1] == "None")): j = j + 1 elif(dataset[metric][j] != "None"): myds.append(dataset['ems_time'][j]) - myy.append(dataset[metric][j]) + myy.append(float(dataset[metric][j])) j = j + 1 if (dataset[metric][len(dataset[metric]) - 1] != "None"): -- GitLab