jerin commited on
Commit
cea29ef
1 Parent(s): cd9d584

add keras model

Browse files
.gitignore CHANGED
@@ -4,5 +4,4 @@ venv
4
  __pycache__/
5
  *.tf
6
  data
7
- *.keras
8
  *.csv
 
4
  __pycache__/
5
  *.tf
6
  data
 
7
  *.csv
src/main.py CHANGED
@@ -6,9 +6,10 @@ import paho.mqtt.client as mqtt
6
 
7
 
8
  def main():
9
- rtu_data_pipeline = RTUPipeline(scaler_path="rtu/models/scaler_1.pkl")
 
10
  rtu_anomalizer = RTUAnomalizer(
11
- prediction_model_path="rtu/models/lstm_4rtu_smooth_02.keras",
12
  clustering_model_paths=[
13
  "rtu/models/kmeans_model1.pkl",
14
  "rtu/models/kmeans_model2.pkl",
@@ -36,7 +37,6 @@ def main():
36
 
37
 
38
  if __name__=='__main__':
39
- #
40
  main()
41
 
42
 
 
6
 
7
 
8
  def main():
9
+ rtu_data_pipeline = RTUPipeline(scaler_path="src/rtu/models/scaler_1.pkl")
10
+ print(rtu_data_pipeline.scaler)
11
  rtu_anomalizer = RTUAnomalizer(
12
+ prediction_model_path="src/rtu/models/lstm_4rtu_smooth_02.keras",
13
  clustering_model_paths=[
14
  "rtu/models/kmeans_model1.pkl",
15
  "rtu/models/kmeans_model2.pkl",
 
37
 
38
 
39
  if __name__=='__main__':
 
40
  main()
41
 
42
 
src/rtu/RTUPipeline.py CHANGED
@@ -66,7 +66,7 @@ class RTUPipeline:
66
  self.df = pd.DataFrame(columns = self.column_names)
67
 
68
  def get_scaler(self, scaler_path):
69
- return scaler_path
70
 
71
  def get_window(self, df):
72
  len_df = np.len(df)
 
66
  self.df = pd.DataFrame(columns = self.column_names)
67
 
68
  def get_scaler(self, scaler_path):
69
+ return joblib.load(scaler_path)
70
 
71
  def get_window(self, df):
72
  len_df = np.len(df)
src/rtu/models/lstm_4rtu_smooth_02.keras ADDED
Binary file (609 kB). View file