Former-commit-id:masterdc7bfbbd0c
[formerly3ca744df99
] [formerly3d16bb5bbd
[formerly5f41e183ae
]] [formerly729a2471b4
[formerlyb5327658f8
] [formerly01f906b4f1
[formerly7f0be2827f
]]] [formerly78eb5bf681
[formerly92482fb4aa
] [formerly625c2e3a7e
[formerly7bf6e5fa28
]] [formerly6d54fd6bed
[formerlyd03643875a
] [formerly53d12df6df
[formerly268bb82a91
]]]] [formerly00bc78bbd3
[formerly0922eab7c6
] [formerly18af0b7ecd
[formerlyabd196b7b7
]] [formerly0cb85e92b3
[formerly8e3a53b6d7
] [formerlyaef929ccdb
[formerly26ab8eeba0
]]] [formerly7047bd92f1
[formerly8965b0faf0
] [formerlyab53b96565
[formerly814f8f0f36
]] [formerly3072224f91
[formerly93fa2d4f6d
] [formerly76ab40fe1b
[formerly3959e5ad4a
]]]]] [formerly4f25096e37
[formerly15a2980fb9
] [formerly2338b79a16
[formerly430ee94468
]] [formerly9539cf1df5
[formerlye023b5484a
] [formerly3f61ea1839
[formerlyfcc6cd8f54
]]] [formerlydfc45b0372
[formerly715350ee31
] [formerly31eb8eb936
[formerly79ef03df7f
]] [formerly8271b2c198
[formerly6f58155921
] [formerly1973d5c7a7
[formerlya146a4f3db
]]]] [formerly0ca1c64472
[formerly0e87d6bf8a
] [formerlye4361a10c1
[formerlyeceb1696e3
]] [formerly9062576230
[formerly7b1577b61c
] [formerlyfeae077f63
[formerly0f1e3701df
]]] [formerlye2415ee142
[formerly095d3b4211
] [formerly0ac0f249c1
[formerly49acfcf617
]] [formerlybe42573943
[formerly742f73259a
] [formerlye70fec1de9
[formerly3511514342
]]]]]] Former-commit-id:cbdc86d196
[formerly22518f24fc
] [formerly6a29499061
[formerly3f4664f615
]] [formerly672b52311b
[formerlyffc476e91b
] [formerly83f13f2b62
[formerly997ad876a9
]]] [formerly0a74eaf4c1
[formerlyb90f15a550
] [formerly8aaab6be45
[formerly3de83aa3f2
]] [formerly50b16c4e09
[formerly5dbbb455c0
] [formerlyac4f17a3f1
[formerly3a4f876f0c
]]]] [formerlyad77b05e09
[formerly8942efd170
] [formerlye35fd3659c
[formerly804e8443d2
]] [formerlye0bb5e8b11
[formerly29fb65a56e
] [formerly4039900e8b
[formerlya18e638938
]]] [formerlyd733af0635
[formerly130fa77c67
] [formerlyedd515d3ef
[formerly8f7782ccad
]] [formerly21ebc4753c
[formerly8e6a82ad59
] [formerlye70fec1de9
]]]] Former-commit-id:dec666697f
[formerly2e605492b7
] [formerly6037d93bff
[formerly436cc99a3c
]] [formerly178668f0d2
[formerly075d38fed4
] [formerly99a90daec6
[formerly3d619f8d42
]]] [formerly080f9d57c9
[formerlya239a36a23
] [formerly1aae767967
[formerly6e11d426c3
]] [formerly92c7495eb0
[formerly9a5363b1c6
] [formerly5e94bcdbf9
[formerly020cd2a13c
]]]] Former-commit-id:31c811bc8a
[formerlya3090b22f2
] [formerlyf8cd8cfb06
[formerly108f6a2ae4
]] [formerlyf8c5eea6bd
[formerlyf27013177a
] [formerly1bacd4bf63
[formerlyc262029fae
]]] Former-commit-id:c1a8dce789
[formerly4e4ece5e54
] [formerly4731a09f7a
[formerly223694eb2b
]] Former-commit-id:58143b789f
[formerly0eefa0e1e2
] Former-commit-id:8f4ff51cf2
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.ABOD_skinterface import ABODSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.ABOD_skinterface import ABODSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.AutoEncoder_skinterface import AutoEncoderSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.AutoEncoder_skinterface import AutoEncoderSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,23 +0,0 @@ | |||||
import numpy as np | |||||
from test_interface import SKInterface | |||||
from tods.detection_algorithm.AutoRegODetect import AutoRegODetectorPrimitive | |||||
class AutoRegODetect(SKInterface): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=AutoRegODetectorPrimitive, **hyperparams) | |||||
if __name__ == '__main__': | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = AutoRegODetect(contamination=0.2, window_size=2)#use_column=(1,) | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.produce(X_test) | |||||
prediction_score = transformer.produce_score(X_test) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) | |||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.AutoRegODetector_skinterface import AutoRegODetectorSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.AutoRegODetector_skinterface import AutoRegODetectorSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.CBLOF_skinterface import CBLOFSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.CBLOF_skinterface import CBLOFSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.COF_skinterface import COFSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.COF_skinterface import COFSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.DeepLog_skinterface import DeepLogSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.DeepLog_skinterface import DeepLogSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.Ensemble_skinterface import EnsembleSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.Ensemble_skinterface import EnsembleSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.HBOS_skinterface import HBOSSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.HBOS_skinterface import HBOSSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.IsolationForest_skinterface import IsolationForestSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.IsolationForest_skinterface import IsolationForestSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.KDiscordODetector_skinterface import KDiscordODetectorSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.KDiscordODetector_skinterface import KDiscordODetectorSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.KNN_skinterface import KNNSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.KNN_skinterface import KNNSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.LODA_skinterface import LODASKI | |||||
from skinterface.primitiveSKI.detection_algorithm.LODA_skinterface import LODASKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.LOF_skinterface import LOFSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.LOF_skinterface import LOFSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.LSTMODetector_skinterface import LSTMODetectorSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.LSTMODetector_skinterface import LSTMODetectorSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.MatrixProfile_skinterface import MatrixProfileSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.MatrixProfile_skinterface import MatrixProfileSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.Mo_Gaal_skinterface import Mo_GaalSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.Mo_Gaal_skinterface import Mo_GaalSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.OCSVM_skinterface import OCSVMSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.OCSVM_skinterface import OCSVMSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.PCAODetector_skinterface import PCAODetectorSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.PCAODetector_skinterface import PCAODetectorSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.SOD_skinterface import SODSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.SOD_skinterface import SODSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.So_Gaal_skinterface import So_GaalSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.So_Gaal_skinterface import So_GaalSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.SystemWiseDetection_skinterface import SystemWiseDetectionSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.SystemWiseDetection_skinterface import SystemWiseDetectionSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.Telemanom_skinterface import TelemanomSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.Telemanom_skinterface import TelemanomSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from skinterface.primitiveSKI.VariationalAutoEncoder_skinterface import VariationalAutoEncoderSKI | |||||
from skinterface.primitiveSKI.detection_algorithm.VariationalAutoEncoder_skinterface import VariationalAutoEncoderSKI | |||||
X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | ||||
@@ -30,7 +30,7 @@ for primitive_index, primitive_start_loc in enumerate(primitive_start_loc_buf): | |||||
# sys.path.insert(0, 'tods/utils')""" | # sys.path.insert(0, 'tods/utils')""" | ||||
import_line1 = 'import numpy as np' | import_line1 = 'import numpy as np' | ||||
import_line2 = '\nfrom skinterface.primitiveSKI.'+ primitve_api_name + ' import ' + class_name + '\n\n' | |||||
import_line2 = '\nfrom skinterface.primitiveSKI.detection_algorithm.'+ primitve_api_name + ' import ' + class_name + '\n\n' | |||||
#print(import_line) | #print(import_line) | ||||
main_line1 = """X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | main_line1 = """X_train = np.array([[3., 4., 8., 16, 18, 13., 22., 36., 59., 128, 62, 67, 78, 100]]) | ||||
@@ -1,8 +0,0 @@ | |||||
import numpy as np | |||||
from .Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.AutoCorrelation import AutoCorrelationPrimitive | |||||
class AutoCorrelationSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=AutoCorrelationPrimitive, **hyperparams) | |||||
@@ -1,6 +0,0 @@ | |||||
# from primitiveSKI.ABOD_skinterface import ABODSKI | |||||
# from primitiveSKI.AutoRegODetector_skinterface import AutoRegODetectorSKI | |||||
#from ABOD_skinterface import ABODSKI | |||||
#from AutoRegODetector_skinterface import AutoRegODetectorSKI | |||||
# import ABODSKI | |||||
# import AutoRegODetectorSKI |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodABOD import ABODPrimitive | from tods.detection_algorithm.PyodABOD import ABODPrimitive | ||||
class ABODSKI(BaseSKI): | class ABODSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodAE import AutoEncoderPrimitive | from tods.detection_algorithm.PyodAE import AutoEncoderPrimitive | ||||
class AutoEncoderSKI(BaseSKI): | class AutoEncoderSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.AutoRegODetect import AutoRegODetectorPrimitive | from tods.detection_algorithm.AutoRegODetect import AutoRegODetectorPrimitive | ||||
class AutoRegODetectorSKI(BaseSKI): | class AutoRegODetectorSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodCBLOF import CBLOFPrimitive | from tods.detection_algorithm.PyodCBLOF import CBLOFPrimitive | ||||
class CBLOFSKI(BaseSKI): | class CBLOFSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodCOF import COFPrimitive | from tods.detection_algorithm.PyodCOF import COFPrimitive | ||||
class COFSKI(BaseSKI): | class COFSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.DeepLog import DeepLogPrimitive | from tods.detection_algorithm.DeepLog import DeepLogPrimitive | ||||
class DeepLogSKI(BaseSKI): | class DeepLogSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.Ensemble import EnsemblePrimitive | from tods.detection_algorithm.Ensemble import EnsemblePrimitive | ||||
class EnsembleSKI(BaseSKI): | class EnsembleSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodHBOS import HBOSPrimitive | from tods.detection_algorithm.PyodHBOS import HBOSPrimitive | ||||
class HBOSSKI(BaseSKI): | class HBOSSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodIsolationForest import IsolationForestPrimitive | from tods.detection_algorithm.PyodIsolationForest import IsolationForestPrimitive | ||||
class IsolationForestSKI(BaseSKI): | class IsolationForestSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.KDiscordODetect import KDiscordODetectorPrimitive | from tods.detection_algorithm.KDiscordODetect import KDiscordODetectorPrimitive | ||||
class KDiscordODetectorSKI(BaseSKI): | class KDiscordODetectorSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodKNN import KNNPrimitive | from tods.detection_algorithm.PyodKNN import KNNPrimitive | ||||
class KNNSKI(BaseSKI): | class KNNSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodLODA import LODAPrimitive | from tods.detection_algorithm.PyodLODA import LODAPrimitive | ||||
class LODASKI(BaseSKI): | class LODASKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodLOF import LOFPrimitive | from tods.detection_algorithm.PyodLOF import LOFPrimitive | ||||
class LOFSKI(BaseSKI): | class LOFSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.LSTMODetect import LSTMODetectorPrimitive | from tods.detection_algorithm.LSTMODetect import LSTMODetectorPrimitive | ||||
class LSTMODetectorSKI(BaseSKI): | class LSTMODetectorSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.MatrixProfile import MatrixProfilePrimitive | from tods.detection_algorithm.MatrixProfile import MatrixProfilePrimitive | ||||
class MatrixProfileSKI(BaseSKI): | class MatrixProfileSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodMoGaal import Mo_GaalPrimitive | from tods.detection_algorithm.PyodMoGaal import Mo_GaalPrimitive | ||||
class Mo_GaalSKI(BaseSKI): | class Mo_GaalSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodOCSVM import OCSVMPrimitive | from tods.detection_algorithm.PyodOCSVM import OCSVMPrimitive | ||||
class OCSVMSKI(BaseSKI): | class OCSVMSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PCAODetect import PCAODetectorPrimitive | from tods.detection_algorithm.PCAODetect import PCAODetectorPrimitive | ||||
class PCAODetectorSKI(BaseSKI): | class PCAODetectorSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodSOD import SODPrimitive | from tods.detection_algorithm.PyodSOD import SODPrimitive | ||||
class SODSKI(BaseSKI): | class SODSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodSoGaal import So_GaalPrimitive | from tods.detection_algorithm.PyodSoGaal import So_GaalPrimitive | ||||
class So_GaalSKI(BaseSKI): | class So_GaalSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.SystemWiseDetection import SystemWiseDetectionPrimitive | from tods.detection_algorithm.SystemWiseDetection import SystemWiseDetectionPrimitive | ||||
class SystemWiseDetectionSKI(BaseSKI): | class SystemWiseDetectionSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.Telemanom import TelemanomPrimitive | from tods.detection_algorithm.Telemanom import TelemanomPrimitive | ||||
class TelemanomSKI(BaseSKI): | class TelemanomSKI(BaseSKI): |
@@ -1,5 +1,5 @@ | |||||
import numpy as np | import numpy as np | ||||
from .Base_skinterface import BaseSKI | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodVAE import VariationalAutoEncoderPrimitive | from tods.detection_algorithm.PyodVAE import VariationalAutoEncoderPrimitive | ||||
class VariationalAutoEncoderSKI(BaseSKI): | class VariationalAutoEncoderSKI(BaseSKI): |
@@ -5,7 +5,7 @@ import os | |||||
with open('tods/utils/skinterface/entry_points.txt','r',encoding='utf-8') as f: | with open('tods/utils/skinterface/entry_points.txt','r',encoding='utf-8') as f: | ||||
entry_file = f.read() | entry_file = f.read() | ||||
output_dir = 'tods/utils/skinterface/primitiveSKI' | |||||
output_dir = 'tods/utils/skinterface/primitiveSKI/detection_algorithm' | |||||
primitive_folder_start_loc_buf = [i.start()+2 for i in re.finditer('=', entry_file)] | primitive_folder_start_loc_buf = [i.start()+2 for i in re.finditer('=', entry_file)] | ||||
@@ -22,7 +22,7 @@ for primitive_index, primitive_start_loc in enumerate(primitive_start_loc_buf): | |||||
# print(entry_file[primitive_folder_start_loc:primitive_start_loc-1]) | # print(entry_file[primitive_folder_start_loc:primitive_start_loc-1]) | ||||
# print(entry_file[primitive_start_loc:primitive_end_loc]) | # print(entry_file[primitive_start_loc:primitive_end_loc]) | ||||
import_line1 = 'import numpy as np \nfrom .Base_skinterface import BaseSKI\n' | |||||
import_line1 = 'import numpy as np \nfrom ..Base_skinterface import BaseSKI\n' | |||||
import_line2 = 'from ' + primitive_folder + ' import ' + primitive_name + '\n\n' | import_line2 = 'from ' + primitive_folder + ' import ' + primitive_name + '\n\n' | ||||
# print(import_line) | # print(import_line) | ||||
@@ -34,7 +34,7 @@ for primitive_index, primitive_start_loc in enumerate(primitive_start_loc_buf): | |||||
python_name = primitive_name.replace('Primitive', '_skinterface.py') | python_name = primitive_name.replace('Primitive', '_skinterface.py') | ||||
with open(os.path.join(output_dir, python_name), 'w', encoding='utf-8') as f: | with open(os.path.join(output_dir, python_name), 'w', encoding='utf-8') as f: | ||||
f.write(python_content) | f.write(python_content) | ||||
#print(os.path.join(output_dir, python_name)) | |||||
print(os.path.join(output_dir, python_name)) | |||||
print(python_content) | print(python_content) | ||||