Spaces:
Sleeping
Sleeping
Commit
·
fff2149
1
Parent(s):
fdd11ec
RTU class
Browse files- src/rtu/RTUAnomalizer.py +14 -0
- src/rtu/RTUPipeline.py +19 -0
- src/rtu/__init__.py +0 -0
src/rtu/RTUAnomalizer.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from tensorflow.keras.models import load_model
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class RTUAnomalizer:
|
| 5 |
+
model = None
|
| 6 |
+
|
| 7 |
+
def __init__(self):
|
| 8 |
+
pass
|
| 9 |
+
|
| 10 |
+
def load_model(self, model_path):
|
| 11 |
+
self.model = load_model(model_path)
|
| 12 |
+
|
| 13 |
+
def pipeline(self, data):
|
| 14 |
+
return
|
src/rtu/RTUPipeline.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from sklearn.preprocessing import StandardScaler
|
| 2 |
+
from pickle import load
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class RTUPipeline:
|
| 6 |
+
scaler = None
|
| 7 |
+
|
| 8 |
+
def __init__(self):
|
| 9 |
+
self.column_names = []
|
| 10 |
+
|
| 11 |
+
def get_scaler(self, scaler_path):
|
| 12 |
+
self.scaler = StandardScaler()
|
| 13 |
+
self.scaler = load(open(scaler_path, "rb"))
|
| 14 |
+
|
| 15 |
+
def get_data(self, data):
|
| 16 |
+
pass
|
| 17 |
+
|
| 18 |
+
def pipeline(self, data):
|
| 19 |
+
pass
|
src/rtu/__init__.py
ADDED
|
File without changes
|