Commit f587389c authored by Jean-Didier's avatar Jean-Didier
Browse files

bug fixing

parent b8bfe111
Pipeline #17889 passed with stage
in 1 minute and 16 seconds
No preview for this file type
......@@ -15,7 +15,7 @@ orchestrator_queue_name = os.environ.get("ORCHESTRATOR_QUEUE_NAME","/topic/orche
#/////////////////////////////////////////////////////////////////////////////////
activemq_username = os.environ.get("ACTIVEMQ_USER","morphemic")
activemq_password = os.environ.get("ACTIVEMQ_PASSWORD","morphemic")
activemq_hostname = os.environ.get("ACTIVEMQ_HOST","18.208.156.33")
activemq_hostname = os.environ.get("ACTIVEMQ_HOST","34.204.67.207")
activemq_port = int(os.environ.get("ACTIVEMQ_PORT","61610"))
#/////////////////////////////////////////////////////////////////////////////////
datasets_path = os.environ.get("DATASET_PATH","./datasets")
......@@ -25,7 +25,7 @@ forecasting_method_name = os.environ.get("FORECASTING_METHOD_NAME","cnn")
#/////////////////////////////////////////////////////////////////////////////////
steps = int(os.environ.get("BACKWARD_STEPS","8"))
#/////////////////////////////////////////////////////////////////////////////////
influxdb_hostname = os.environ.get("INFLUXDB_HOSTNAME","18.208.156.33") #persistent_storage_hostname
influxdb_hostname = os.environ.get("INFLUXDB_HOSTNAME","34.204.67.207") #persistent_storage_hostname
influxdb_port = int(os.environ.get("INFLUXDB_PORT","8086"))
influxdb_username = os.environ.get("INFLUXDB_USERNAME","morphemic")
influxdb_password = os.environ.get("INFLUXDB_PASSWORD","password")
......
This diff is collapsed.
......@@ -327,16 +327,21 @@ class Train():
###########
_start = time.time()
data = data.round(decimals=2)
data = missing_data_handling(data, slinear_interpolation=True, drop_all_nan=True)
data.replace('None', np.nan, inplace=True)
data.fillna(method='ffill', inplace=True)
data = data.dropna()
#data = data[~np.isnan(data).any(axis=1)]
#data = missing_data_handling(data, drop_all_nan=True)
data = datetime_conversion(data, self.time_column_name)
data = important_data(data, self.features)
sampling_rate = '{0}S'.format(self.prediction_horizon)
data = resample(data, sampling_rate)
if len(data) * 0.33 < self.steps:
return {"status": False, "message": "No enough data after sampling", "data": None} #this will be removed
data, scaler = Min_max_scal(data)
data = data[~np.isnan(data).any(axis=1)]
try:
data, scaler = Min_max_scal(data)
except Exception as e:
return {"status": False, "message": "Cannot scale data", "data": None}
#X_train, y_train, X_test,y_test = split_sequences(data, n_steps=steps)
#X_train, y_train, X_test,y_test = split_sequences_univariate(data, n_steps=self.number_of_foreward_forecating)
X_train, y_train, X_test,y_test = split_sequences_multi_steps(data, n_steps_in=self.steps, n_steps_out=self.number_of_foreward_forecating)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment