Former-commit-id:masterceef7ba47b
[formerlyba348a4629
] [formerly24a8fb9ba8
[formerly4ed59d81bd
]] [formerly51eede4e60
[formerly6a564605de
] [formerlycd54dcca17
[formerly8c77fcf2fc
]]] [formerly1960335bfe
[formerly7c05d6d00a
] [formerlyd3a07aab03
[formerly9b2751d1ee
]] [formerlyaabc8ec12a
[formerly9597736403
] [formerlyf2eab48815
[formerly4ef8dbbd61
]]]] [formerlya62a7ecd73
[formerly9c63ee89ff
] [formerly2dedac2d77
[formerlybd2c22ca8c
]] [formerly55b8346b3c
[formerly4423e74869
] [formerly71b1642125
[formerly2bb385049f
]]] [formerlyea6b897cbc
[formerly6099d9dc43
] [formerly74bc01942e
[formerly71e3a70ff2
]] [formerly1b023b830b
[formerly53eeb9cd79
] [formerlyc15b98d545
[formerly54ef14adde
]]]]] [formerly0932f63678
[formerly0f4cf2cc91
] [formerly074a5539be
[formerlyfc4f62ca47
]] [formerly65c886cf57
[formerlyd2895feb19
] [formerly902a4e5bb4
[formerlyb41406607e
]]] [formerly7982111dc8
[formerly9c82e879e7
] [formerly87fcbcb6b9
[formerlybf364a2ce9
]] [formerly86d2746143
[formerlya6b6df4522
] [formerly770f7e63ec
[formerly205bc90605
]]]] [formerly2c0a8d5130
[formerlyaaceef1e64
] [formerly22a1c9e69f
[formerlyb68bd90df9
]] [formerly8a7794ea89
[formerly66cb77ffa9
] [formerlyf81aa8f3db
[formerlye1cd70e030
]]] [formerlyf0b62ea0e8
[formerlydf6b72f952
] [formerly2aa1d1bc37
[formerlyc2ce97e424
]] [formerly5bab864ce0
[formerlyb4487fc67c
] [formerlyc94f99836a
[formerly8068df0e3d
]]]]]] Former-commit-id:a4ac7bfc9d
[formerlyb2d09523cb
] [formerly3e3d9413c3
[formerly4dc49d294f
]] [formerly854aa48f99
[formerly50a1819633
] [formerly0564391a98
[formerly667d6da53f
]]] [formerly509ebe4aa0
[formerly127677d4a0
] [formerlye525664d1f
[formerlyc3881ccaa4
]] [formerlyde20697fe9
[formerlybb407a31c3
] [formerlyc3498cd18d
[formerly9a089b15cb
]]]] [formerly57dbe5e20d
[formerly68f9c89583
] [formerly2b33e5da02
[formerly76f88ae033
]] [formerly2cdb9a0621
[formerly1188588c46
] [formerlyd4bbf3985c
[formerlyd8a24d6c18
]]] [formerly5d7574a109
[formerlyf83edb10e0
] [formerly4e9fdcdde7
[formerlyacef691175
]] [formerlyf3d4801323
[formerly48cb525de5
] [formerly6e86be21d0
[formerlyc94f99836a
]]]]] Former-commit-id:c24d26309b
[formerlyb820dbb3bd
] [formerly50a7cd7d55
[formerly60f32864a8
]] [formerlya91afd5e97
[formerly05b7cd449d
] [formerlyc7705a0001
[formerlyaa65bd799f
]]] [formerlyae7a86febb
[formerly228c19c5e7
] [formerly50b7b3bd6e
[formerly10d4d9613d
]] [formerly09650c11cf
[formerly88f655927d
] [formerly63a2bd45c5
[formerly0dc9cdf402
]]]] Former-commit-id:6de151ac25
[formerlyc2763a64db
] [formerly25ef977c15
[formerly5f2346626f
]] [formerlydd7d57dc37
[formerlyc5a9787a2d
] [formerlyd26cefa850
[formerly86c6336be2
]]] Former-commit-id:78cb2e45ff
[formerlyfc0dd55601
] [formerly713f38d482
[formerlyf96779faea
]] Former-commit-id:07d8480e6b
[formerlye04783eed4
] Former-commit-id:67df0c211a
@@ -253,7 +253,7 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
if self._training_inputs is None: # pragma: no cover | if self._training_inputs is None: # pragma: no cover | ||||
return CallResult(None) | return CallResult(None) | ||||
#print("self._training_indices ", self._training_indices) | |||||
if len(self._training_indices) > 0: | if len(self._training_indices) > 0: | ||||
# print('Fit: ', self._clf) | # print('Fit: ', self._clf) | ||||
@@ -288,6 +288,7 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
if self.hyperparams['use_semantic_types']: | if self.hyperparams['use_semantic_types']: | ||||
sk_inputs = inputs.iloc[:, self._training_indices] | sk_inputs = inputs.iloc[:, self._training_indices] | ||||
output_columns = [] | output_columns = [] | ||||
#print("skinputs ", sk_inputs.values) | |||||
if len(self._training_indices) > 0: | if len(self._training_indices) > 0: | ||||
if self.hyperparams['return_subseq_inds']: | if self.hyperparams['return_subseq_inds']: | ||||
@@ -315,7 +316,7 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
else: | else: | ||||
sk_output, _, _ = self._clf.predict(sk_inputs.values) | sk_output, _, _ = self._clf.predict(sk_inputs.values) | ||||
# print(sk_output) | |||||
#print("sk output ", sk_output) | |||||
if sparse.issparse(sk_output): # pragma: no cover | if sparse.issparse(sk_output): # pragma: no cover | ||||
sk_output = sk_output.toarray() | sk_output = sk_output.toarray() | ||||
@@ -323,16 +324,16 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
if len(outputs.columns) == len(self._input_column_names): | if len(outputs.columns) == len(self._input_column_names): | ||||
outputs.columns = self._input_column_names | outputs.columns = self._input_column_names | ||||
output_columns = [outputs] | output_columns = [outputs] | ||||
else: # pragma: no cover | |||||
else: # pragma: no cover | |||||
if self.hyperparams['error_on_no_input']: | if self.hyperparams['error_on_no_input']: | ||||
raise RuntimeError("No input columns were selected") | raise RuntimeError("No input columns were selected") | ||||
self.logger.warn("No input columns were selected") | self.logger.warn("No input columns were selected") | ||||
outputs = base_utils.combine_columns(return_result=self.hyperparams['return_result'], | outputs = base_utils.combine_columns(return_result=self.hyperparams['return_result'], | ||||
add_index_columns=self.hyperparams['add_index_columns'], | add_index_columns=self.hyperparams['add_index_columns'], | ||||
inputs=inputs, column_indices=self._training_indices, | inputs=inputs, column_indices=self._training_indices, | ||||
columns_list=output_columns) | columns_list=output_columns) | ||||
return CallResult(outputs) | return CallResult(outputs) | ||||
def produce_score(self, *, inputs: Inputs, timeout: float = None, iterations: int = None) -> CallResult[Outputs]: | def produce_score(self, *, inputs: Inputs, timeout: float = None, iterations: int = None) -> CallResult[Outputs]: | ||||
@@ -488,21 +489,21 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
Returns: | Returns: | ||||
list | list | ||||
""" | """ | ||||
#print("*******************get columns to fit***********") | |||||
if not hyperparams['use_semantic_types']: | if not hyperparams['use_semantic_types']: | ||||
return inputs, list(range(len(inputs.columns))) | return inputs, list(range(len(inputs.columns))) | ||||
inputs_metadata = inputs.metadata | inputs_metadata = inputs.metadata | ||||
#print("inputs_metadata ", inputs_metadata) | |||||
def can_produce_column(column_index: int) -> bool: | def can_produce_column(column_index: int) -> bool: | ||||
return cls._can_produce_column(inputs_metadata, column_index, hyperparams) | return cls._can_produce_column(inputs_metadata, column_index, hyperparams) | ||||
columns_to_produce, columns_not_to_produce = base_utils.get_columns_to_use(inputs_metadata, | columns_to_produce, columns_not_to_produce = base_utils.get_columns_to_use(inputs_metadata, | ||||
use_columns=hyperparams['use_columns'], | use_columns=hyperparams['use_columns'], | ||||
exclude_columns=hyperparams['exclude_columns'], | exclude_columns=hyperparams['exclude_columns'], | ||||
can_use_column=can_produce_column) | can_use_column=can_produce_column) | ||||
#print("columns_to_produce ", columns_to_produce) | |||||
return inputs.iloc[:, columns_to_produce], columns_to_produce | return inputs.iloc[:, columns_to_produce], columns_to_produce | ||||
# return columns_to_produce | # return columns_to_produce | ||||
@@ -519,16 +520,18 @@ class UnsupervisedOutlierDetectorBase(UnsupervisedLearnerPrimitiveBase[Inputs, O | |||||
Returns: | Returns: | ||||
bool | bool | ||||
""" | """ | ||||
column_metadata = inputs_metadata.query((metadata_base.ALL_ELEMENTS, column_index)) | column_metadata = inputs_metadata.query((metadata_base.ALL_ELEMENTS, column_index)) | ||||
#print("column metadasta ", ) | |||||
accepted_structural_types = (int, float, numpy.integer, numpy.float64) | accepted_structural_types = (int, float, numpy.integer, numpy.float64) | ||||
accepted_semantic_types = set() | accepted_semantic_types = set() | ||||
accepted_semantic_types.add("https://metadata.datadrivendiscovery.org/types/Attribute") | accepted_semantic_types.add("https://metadata.datadrivendiscovery.org/types/Attribute") | ||||
if not issubclass(column_metadata['structural_type'], accepted_structural_types): | if not issubclass(column_metadata['structural_type'], accepted_structural_types): | ||||
return False | return False | ||||
semantic_types = set(column_metadata.get('semantic_types', [])) | semantic_types = set(column_metadata.get('semantic_types', [])) | ||||
#print("semantic_types ", column_metadata.get('semantic_types')) | |||||
if len(semantic_types) == 0: | if len(semantic_types) == 0: | ||||
cls.logger.warning("No semantic types found in column metadata") | cls.logger.warning("No semantic types found in column metadata") | ||||
return False | return False | ||||
@@ -56,7 +56,6 @@ class DeepLogTest(unittest.TestCase): | |||||
hyperparams_class = DeepLogPrimitive.metadata.get_hyperparams() | hyperparams_class = DeepLogPrimitive.metadata.get_hyperparams() | ||||
hyperparams = hyperparams_class.defaults() | hyperparams = hyperparams_class.defaults() | ||||
hyperparams = hyperparams.replace({'batch_size': 4}) | hyperparams = hyperparams.replace({'batch_size': 4}) | ||||
print(hyperparams) | print(hyperparams) | ||||
self.primitive = DeepLogPrimitive(hyperparams=hyperparams) | self.primitive = DeepLogPrimitive(hyperparams=hyperparams) | ||||
@@ -56,9 +56,9 @@ class ABODTest(unittest.TestCase): | |||||
hyperparams = hyperparams_class.defaults() | hyperparams = hyperparams_class.defaults() | ||||
hyperparams = hyperparams.replace({'return_result': 'new', | hyperparams = hyperparams.replace({'return_result': 'new', | ||||
'method': 'default', | 'method': 'default', | ||||
}) | }) | ||||
print(hyperparams) | |||||
primitive = ABODPrimitive(hyperparams=hyperparams) | primitive = ABODPrimitive(hyperparams=hyperparams) | ||||
primitive.set_training_data(inputs=main) | primitive.set_training_data(inputs=main) | ||||
primitive.fit() | primitive.fit() | ||||
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = ABODSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = AutoEncoderSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = AutoRegODetectorSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = CBLOFSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = COFSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = DeepLogSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = EnsembleSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = HBOSSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = IsolationForestSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = KDiscordODetectorSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = KNNSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = LODASKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = LOFSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = LSTMODetectorSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = MatrixProfileSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = Mo_GaalSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = OCSVMSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = PCAODetectorSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = SODSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = So_GaalSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = SystemWiseDetectionSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = TelemanomSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,14 @@ | |||||
import numpy as np | |||||
from tods.tods_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_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = VariationalAutoEncoderSKI() | |||||
transformer.fit(X_train) | |||||
prediction_labels = transformer.predict(X_test) | |||||
prediction_score = transformer.predict_score(X_test) | |||||
print("Primitive: ", transformer.primitive) | |||||
print("Prediction Labels\n", prediction_labels) | |||||
print("Prediction Score\n", prediction_score) |
@@ -0,0 +1,82 @@ | |||||
[d3m.primitives] | |||||
tods.data_processing.dataset_to_dataframe = tods.data_processing.DatasetToDataframe:DatasetToDataFramePrimitive | |||||
tods.data_processing.time_interval_transform = tods.data_processing.TimeIntervalTransform:TimeIntervalTransformPrimitive | |||||
tods.data_processing.categorical_to_binary = tods.data_processing.CategoricalToBinary:CategoricalToBinaryPrimitive | |||||
tods.data_processing.column_filter = tods.data_processing.ColumnFilter:ColumnFilterPrimitive | |||||
tods.data_processing.timestamp_validation = tods.data_processing.TimeStampValidation:TimeStampValidationPrimitive | |||||
tods.data_processing.duplication_validation = tods.data_processing.DuplicationValidation:DuplicationValidationPrimitive | |||||
tods.data_processing.continuity_validation = tods.data_processing.ContinuityValidation:ContinuityValidationPrimitive | |||||
tods.data_processing.impute_missing = tods.data_processing.SKImputer:SKImputerPrimitive | |||||
tods.timeseries_processing.transformation.axiswise_scaler = tods.timeseries_processing.SKAxiswiseScaler:SKAxiswiseScalerPrimitive | |||||
tods.timeseries_processing.transformation.standard_scaler = tods.timeseries_processing.SKStandardScaler:SKStandardScalerPrimitive | |||||
tods.timeseries_processing.transformation.power_transformer = tods.timeseries_processing.SKPowerTransformer:SKPowerTransformerPrimitive | |||||
tods.timeseries_processing.transformation.quantile_transformer = tods.timeseries_processing.SKQuantileTransformer:SKQuantileTransformerPrimitive | |||||
tods.timeseries_processing.transformation.moving_average_transform = tods.timeseries_processing.MovingAverageTransformer:MovingAverageTransformerPrimitive | |||||
tods.timeseries_processing.transformation.simple_exponential_smoothing = tods.timeseries_processing.SimpleExponentialSmoothing:SimpleExponentialSmoothingPrimitive | |||||
tods.timeseries_processing.transformation.holt_smoothing = tods.timeseries_processing.HoltSmoothing:HoltSmoothingPrimitive | |||||
tods.timeseries_processing.transformation.holt_winters_exponential_smoothing= tods.timeseries_processing.HoltWintersExponentialSmoothing:HoltWintersExponentialSmoothingPrimitive | |||||
tods.timeseries_processing.decomposition.time_series_seasonality_trend_decomposition = tods.timeseries_processing.TimeSeriesSeasonalityTrendDecomposition:TimeSeriesSeasonalityTrendDecompositionPrimitive | |||||
tods.feature_analysis.auto_correlation = tods.feature_analysis.AutoCorrelation:AutoCorrelationPrimitive | |||||
tods.feature_analysis.statistical_mean = tods.feature_analysis.StatisticalMean:StatisticalMeanPrimitive | |||||
tods.feature_analysis.statistical_median = tods.feature_analysis.StatisticalMedian:StatisticalMedianPrimitive | |||||
tods.feature_analysis.statistical_g_mean = tods.feature_analysis.StatisticalGmean:StatisticalGmeanPrimitive | |||||
tods.feature_analysis.statistical_abs_energy = tods.feature_analysis.StatisticalAbsEnergy:StatisticalAbsEnergyPrimitive | |||||
tods.feature_analysis.statistical_abs_sum = tods.feature_analysis.StatisticalAbsSum:StatisticalAbsSumPrimitive | |||||
tods.feature_analysis.statistical_h_mean = tods.feature_analysis.StatisticalHmean:StatisticalHmeanPrimitive | |||||
tods.feature_analysis.statistical_maximum = tods.feature_analysis.StatisticalMaximum:StatisticalMaximumPrimitive | |||||
tods.feature_analysis.statistical_minimum = tods.feature_analysis.StatisticalMinimum:StatisticalMinimumPrimitive | |||||
tods.feature_analysis.statistical_mean_abs = tods.feature_analysis.StatisticalMeanAbs:StatisticalMeanAbsPrimitive | |||||
tods.feature_analysis.statistical_mean_abs_temporal_derivative = tods.feature_analysis.StatisticalMeanAbsTemporalDerivative:StatisticalMeanAbsTemporalDerivativePrimitive | |||||
tods.feature_analysis.statistical_mean_temporal_derivative = tods.feature_analysis.StatisticalMeanTemporalDerivative:StatisticalMeanTemporalDerivativePrimitive | |||||
tods.feature_analysis.statistical_median_abs_deviation = tods.feature_analysis.StatisticalMedianAbsoluteDeviation:StatisticalMedianAbsoluteDeviationPrimitive | |||||
tods.feature_analysis.statistical_kurtosis = tods.feature_analysis.StatisticalKurtosis:StatisticalKurtosisPrimitive | |||||
tods.feature_analysis.statistical_skew = tods.feature_analysis.StatisticalSkew:StatisticalSkewPrimitive | |||||
tods.feature_analysis.statistical_std = tods.feature_analysis.StatisticalStd:StatisticalStdPrimitive | |||||
tods.feature_analysis.statistical_var = tods.feature_analysis.StatisticalVar:StatisticalVarPrimitive | |||||
tods.feature_analysis.statistical_variation = tods.feature_analysis.StatisticalVariation:StatisticalVariationPrimitive | |||||
tods.feature_analysis.statistical_vec_sum = tods.feature_analysis.StatisticalVecSum:StatisticalVecSumPrimitive | |||||
tods.feature_analysis.statistical_willison_amplitude = tods.feature_analysis.StatisticalWillisonAmplitude:StatisticalWillisonAmplitudePrimitive | |||||
tods.feature_analysis.statistical_zero_crossing = tods.feature_analysis.StatisticalZeroCrossing:StatisticalZeroCrossingPrimitive | |||||
tods.feature_analysis.spectral_residual_transform = tods.feature_analysis.SpectralResidualTransform:SpectralResidualTransformPrimitive | |||||
tods.feature_analysis.fast_fourier_transform = tods.feature_analysis.FastFourierTransform:FastFourierTransformPrimitive | |||||
tods.feature_analysis.discrete_cosine_transform = tods.feature_analysis.DiscreteCosineTransform:DiscreteCosineTransformPrimitive | |||||
tods.feature_analysis.non_negative_matrix_factorization = tods.feature_analysis.NonNegativeMatrixFactorization:NonNegativeMatrixFactorizationPrimitive | |||||
tods.feature_analysis.bk_filter = tods.feature_analysis.BKFilter:BKFilterPrimitive | |||||
tods.feature_analysis.hp_filter = tods.feature_analysis.HPFilter:HPFilterPrimitive | |||||
tods.feature_analysis.truncated_svd = tods.feature_analysis.SKTruncatedSVD:SKTruncatedSVDPrimitive | |||||
tods.feature_analysis.wavelet_transform = tods.feature_analysis.WaveletTransform:WaveletTransformPrimitive | |||||
tods.feature_analysis.trmf = tods.feature_analysis.TRMF:TRMFPrimitive | |||||
tods.detection_algorithm.pyod_ae = tods.detection_algorithm.PyodAE:AutoEncoderPrimitive | |||||
tods.detection_algorithm.pyod_vae = tods.detection_algorithm.PyodVAE:VariationalAutoEncoderPrimitive | |||||
tods.detection_algorithm.pyod_cof = tods.detection_algorithm.PyodCOF:COFPrimitive | |||||
tods.detection_algorithm.pyod_sod = tods.detection_algorithm.PyodSOD:SODPrimitive | |||||
tods.detection_algorithm.pyod_abod = tods.detection_algorithm.PyodABOD:ABODPrimitive | |||||
tods.detection_algorithm.pyod_hbos = tods.detection_algorithm.PyodHBOS:HBOSPrimitive | |||||
tods.detection_algorithm.pyod_iforest = tods.detection_algorithm.PyodIsolationForest:IsolationForestPrimitive | |||||
tods.detection_algorithm.pyod_lof = tods.detection_algorithm.PyodLOF:LOFPrimitive | |||||
tods.detection_algorithm.pyod_knn = tods.detection_algorithm.PyodKNN:KNNPrimitive | |||||
tods.detection_algorithm.pyod_ocsvm = tods.detection_algorithm.PyodOCSVM:OCSVMPrimitive | |||||
tods.detection_algorithm.pyod_loda = tods.detection_algorithm.PyodLODA:LODAPrimitive | |||||
tods.detection_algorithm.pyod_cblof = tods.detection_algorithm.PyodCBLOF:CBLOFPrimitive | |||||
tods.detection_algorithm.pyod_sogaal = tods.detection_algorithm.PyodSoGaal:So_GaalPrimitive | |||||
tods.detection_algorithm.pyod_mogaal = tods.detection_algorithm.PyodMoGaal:Mo_GaalPrimitive | |||||
tods.detection_algorithm.matrix_profile = tods.detection_algorithm.MatrixProfile:MatrixProfilePrimitive | |||||
tods.detection_algorithm.AutoRegODetector = tods.detection_algorithm.AutoRegODetect:AutoRegODetectorPrimitive | |||||
tods.detection_algorithm.LSTMODetector = tods.detection_algorithm.LSTMODetect:LSTMODetectorPrimitive | |||||
tods.detection_algorithm.PCAODetector = tods.detection_algorithm.PCAODetect:PCAODetectorPrimitive | |||||
tods.detection_algorithm.KDiscordODetector = tods.detection_algorithm.KDiscordODetect:KDiscordODetectorPrimitive | |||||
tods.detection_algorithm.deeplog = tods.detection_algorithm.DeepLog:DeepLogPrimitive | |||||
tods.detection_algorithm.telemanom = tods.detection_algorithm.Telemanom:TelemanomPrimitive | |||||
tods.detection_algorithm.system_wise_detection = tods.detection_algorithm.SystemWiseDetection:SystemWiseDetectionPrimitive | |||||
tods.detection_algorithm.Ensemble = tods.detection_algorithm.Ensemble:EnsemblePrimitive | |||||
tods.reinforcement.rule_filter = tods.reinforcement.RuleBasedFilter:RuleBasedFilter | |||||
@@ -0,0 +1,23 @@ | |||||
tods.detection_algorithm.pyod_ae = tods.detection_algorithm.PyodAE:AutoEncoderPrimitive | |||||
tods.detection_algorithm.pyod_vae = tods.detection_algorithm.PyodVAE:VariationalAutoEncoderPrimitive | |||||
tods.detection_algorithm.pyod_cof = tods.detection_algorithm.PyodCOF:COFPrimitive | |||||
tods.detection_algorithm.pyod_sod = tods.detection_algorithm.PyodSOD:SODPrimitive | |||||
tods.detection_algorithm.pyod_abod = tods.detection_algorithm.PyodABOD:ABODPrimitive | |||||
tods.detection_algorithm.pyod_hbos = tods.detection_algorithm.PyodHBOS:HBOSPrimitive | |||||
tods.detection_algorithm.pyod_iforest = tods.detection_algorithm.PyodIsolationForest:IsolationForestPrimitive | |||||
tods.detection_algorithm.pyod_lof = tods.detection_algorithm.PyodLOF:LOFPrimitive | |||||
tods.detection_algorithm.pyod_knn = tods.detection_algorithm.PyodKNN:KNNPrimitive | |||||
tods.detection_algorithm.pyod_ocsvm = tods.detection_algorithm.PyodOCSVM:OCSVMPrimitive | |||||
tods.detection_algorithm.pyod_loda = tods.detection_algorithm.PyodLODA:LODAPrimitive | |||||
tods.detection_algorithm.pyod_cblof = tods.detection_algorithm.PyodCBLOF:CBLOFPrimitive | |||||
tods.detection_algorithm.pyod_sogaal = tods.detection_algorithm.PyodSoGaal:So_GaalPrimitive | |||||
tods.detection_algorithm.pyod_mogaal = tods.detection_algorithm.PyodMoGaal:Mo_GaalPrimitive | |||||
tods.detection_algorithm.matrix_profile = tods.detection_algorithm.MatrixProfile:MatrixProfilePrimitive | |||||
tods.detection_algorithm.AutoRegODetector = tods.detection_algorithm.AutoRegODetect:AutoRegODetectorPrimitive | |||||
tods.detection_algorithm.LSTMODetector = tods.detection_algorithm.LSTMODetect:LSTMODetectorPrimitive | |||||
tods.detection_algorithm.PCAODetector = tods.detection_algorithm.PCAODetect:PCAODetectorPrimitive | |||||
tods.detection_algorithm.KDiscordODetector = tods.detection_algorithm.KDiscordODetect:KDiscordODetectorPrimitive | |||||
tods.detection_algorithm.deeplog = tods.detection_algorithm.DeepLog:DeepLogPrimitive | |||||
tods.detection_algorithm.telemanom = tods.detection_algorithm.Telemanom:TelemanomPrimitive | |||||
tods.detection_algorithm.system_wise_detection = tods.detection_algorithm.SystemWiseDetection:SystemWiseDetectionPrimitive | |||||
tods.detection_algorithm.Ensemble = tods.detection_algorithm.Ensemble:EnsemblePrimitive |
@@ -0,0 +1,33 @@ | |||||
tods.feature_analysis.auto_correlation = tods.feature_analysis.AutoCorrelation:AutoCorrelationPrimitive | |||||
tods.feature_analysis.statistical_mean = tods.feature_analysis.StatisticalMean:StatisticalMeanPrimitive | |||||
tods.feature_analysis.statistical_median = tods.feature_analysis.StatisticalMedian:StatisticalMedianPrimitive | |||||
tods.feature_analysis.statistical_g_mean = tods.feature_analysis.StatisticalGmean:StatisticalGmeanPrimitive | |||||
tods.feature_analysis.statistical_abs_energy = tods.feature_analysis.StatisticalAbsEnergy:StatisticalAbsEnergyPrimitive | |||||
tods.feature_analysis.statistical_abs_sum = tods.feature_analysis.StatisticalAbsSum:StatisticalAbsSumPrimitive | |||||
tods.feature_analysis.statistical_h_mean = tods.feature_analysis.StatisticalHmean:StatisticalHmeanPrimitive | |||||
tods.feature_analysis.statistical_maximum = tods.feature_analysis.StatisticalMaximum:StatisticalMaximumPrimitive | |||||
tods.feature_analysis.statistical_minimum = tods.feature_analysis.StatisticalMinimum:StatisticalMinimumPrimitive | |||||
tods.feature_analysis.statistical_mean_abs = tods.feature_analysis.StatisticalMeanAbs:StatisticalMeanAbsPrimitive | |||||
tods.feature_analysis.statistical_mean_abs_temporal_derivative = tods.feature_analysis.StatisticalMeanAbsTemporalDerivative:StatisticalMeanAbsTemporalDerivativePrimitive | |||||
tods.feature_analysis.statistical_mean_temporal_derivative = tods.feature_analysis.StatisticalMeanTemporalDerivative:StatisticalMeanTemporalDerivativePrimitive | |||||
tods.feature_analysis.statistical_median_abs_deviation = tods.feature_analysis.StatisticalMedianAbsoluteDeviation:StatisticalMedianAbsoluteDeviationPrimitive | |||||
tods.feature_analysis.statistical_kurtosis = tods.feature_analysis.StatisticalKurtosis:StatisticalKurtosisPrimitive | |||||
tods.feature_analysis.statistical_skew = tods.feature_analysis.StatisticalSkew:StatisticalSkewPrimitive | |||||
tods.feature_analysis.statistical_std = tods.feature_analysis.StatisticalStd:StatisticalStdPrimitive | |||||
tods.feature_analysis.statistical_var = tods.feature_analysis.StatisticalVar:StatisticalVarPrimitive | |||||
tods.feature_analysis.statistical_variation = tods.feature_analysis.StatisticalVariation:StatisticalVariationPrimitive | |||||
tods.feature_analysis.statistical_vec_sum = tods.feature_analysis.StatisticalVecSum:StatisticalVecSumPrimitive | |||||
tods.feature_analysis.statistical_willison_amplitude = tods.feature_analysis.StatisticalWillisonAmplitude:StatisticalWillisonAmplitudePrimitive | |||||
tods.feature_analysis.statistical_zero_crossing = tods.feature_analysis.StatisticalZeroCrossing:StatisticalZeroCrossingPrimitive | |||||
tods.feature_analysis.spectral_residual_transform = tods.feature_analysis.SpectralResidualTransform:SpectralResidualTransformPrimitive | |||||
tods.feature_analysis.fast_fourier_transform = tods.feature_analysis.FastFourierTransform:FastFourierTransformPrimitive | |||||
tods.feature_analysis.discrete_cosine_transform = tods.feature_analysis.DiscreteCosineTransform:DiscreteCosineTransformPrimitive | |||||
tods.feature_analysis.non_negative_matrix_factorization = tods.feature_analysis.NonNegativeMatrixFactorization:NonNegativeMatrixFactorizationPrimitive | |||||
tods.feature_analysis.bk_filter = tods.feature_analysis.BKFilter:BKFilterPrimitive | |||||
tods.feature_analysis.hp_filter = tods.feature_analysis.HPFilter:HPFilterPrimitive | |||||
tods.feature_analysis.truncated_svd = tods.feature_analysis.SKTruncatedSVD:SKTruncatedSVDPrimitive | |||||
tods.feature_analysis.wavelet_transform = tods.feature_analysis.WaveletTransform:WaveletTransformPrimitive | |||||
tods.feature_analysis.trmf = tods.feature_analysis.TRMF:TRMFPrimitive | |||||
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.AutoCorrelation_skinterface import AutoCorrelationSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = AutoCorrelationSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.BKFilter_skinterface import BKFilterSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = BKFilterSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.DiscreteCosineTransform_skinterface import DiscreteCosineTransformSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = DiscreteCosineTransformSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.FastFourierTransform_skinterface import FastFourierTransformSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = FastFourierTransformSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.HPFilter_skinterface import HPFilterSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = HPFilterSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.NonNegativeMatrixFactorization_skinterface import NonNegativeMatrixFactorizationSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = NonNegativeMatrixFactorizationSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.SKTruncatedSVD_skinterface import SKTruncatedSVDSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = SKTruncatedSVDSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.SpectralResidualTransform_skinterface import SpectralResidualTransformSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = SpectralResidualTransformSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalAbsEnergy_skinterface import StatisticalAbsEnergySKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalAbsEnergySKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalAbsSum_skinterface import StatisticalAbsSumSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalAbsSumSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalGmean_skinterface import StatisticalGmeanSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalGmeanSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalHmean_skinterface import StatisticalHmeanSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalHmeanSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalKurtosis_skinterface import StatisticalKurtosisSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalKurtosisSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMaximum_skinterface import StatisticalMaximumSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMaximumSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMeanAbsTemporalDerivative_skinterface import StatisticalMeanAbsTemporalDerivativeSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMeanAbsTemporalDerivativeSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMeanAbs_skinterface import StatisticalMeanAbsSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMeanAbsSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMeanTemporalDerivative_skinterface import StatisticalMeanTemporalDerivativeSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMeanTemporalDerivativeSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMean_skinterface import StatisticalMeanSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMeanSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMedianAbsoluteDeviation_skinterface import StatisticalMedianAbsoluteDeviationSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMedianAbsoluteDeviationSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMedian_skinterface import StatisticalMedianSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMedianSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalMinimum_skinterface import StatisticalMinimumSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalMinimumSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalSkew_skinterface import StatisticalSkewSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalSkewSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalStd_skinterface import StatisticalStdSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalStdSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalVar_skinterface import StatisticalVarSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalVarSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalVariation_skinterface import StatisticalVariationSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalVariationSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalVecSum_skinterface import StatisticalVecSumSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalVecSumSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalWillisonAmplitude_skinterface import StatisticalWillisonAmplitudeSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalWillisonAmplitudeSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.StatisticalZeroCrossing_skinterface import StatisticalZeroCrossingSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = StatisticalZeroCrossingSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.TRMF_skinterface import TRMFSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = TRMFSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from tods.tods_skinterface.primitiveSKI.feature_analysis.WaveletTransform_skinterface import WaveletTransformSKI | |||||
X_test = np.array([[3., 4., 8.6, 13.4, 22.5, 17, 19.2, 36.1, 127, -23, 59.2]]) | |||||
transformer = WaveletTransformSKI() | |||||
X_transform = transformer.produce(X_test) | |||||
print("Primitive:", transformer.primitive) | |||||
print("X_transform:\n", X_transform) |
@@ -0,0 +1,105 @@ | |||||
from d3m import container | |||||
from tods.detection_algorithm import DeepLog | |||||
from tods.detection_algorithm.PyodABOD import ABODPrimitive | |||||
from tods.detection_algorithm.PyodAE import AutoEncoderPrimitive | |||||
from tods.detection_algorithm.PyodSOD import SODPrimitive | |||||
from tods.detection_algorithm.AutoRegODetect import AutoRegODetectorPrimitive | |||||
class BaseSKI(): | |||||
def __init__(self, primitive, **hyperparameter): | |||||
hyperparam_buf = list(primitive.metadata.get_hyperparams().defaults().keys()) | |||||
hyperparam_input = list(hyperparameter.keys()) | |||||
if not set(hyperparam_buf) > set(hyperparam_input): | |||||
invalid_hyperparam = list(set(hyperparam_input) - set(hyperparam_buf)) | |||||
raise TypeError(self.__class__.__name__ + ' got unexpected keyword argument ' + str(invalid_hyperparam)) | |||||
hyperparams_class = primitive.metadata.get_hyperparams() | |||||
hyperparams = hyperparams_class.defaults() | |||||
#print("items ", type(hyperparameter.items())) | |||||
if len(hyperparameter.items())!=0: | |||||
#for key, value in hyperparameter.items(): | |||||
hyperparams = hyperparams.replace(hyperparameter) | |||||
self.primitive = primitive(hyperparams=hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = False | |||||
#print(hyperparams) | |||||
def transform(self, X): #transform the ndarray to d3m dataframe, select columns to use | |||||
# if self.use_columns==(): | |||||
# self.use_columns = [iter for iter in range(len(X))] | |||||
# else: | |||||
# pass | |||||
# print(self.use_columns) | |||||
use_columns = [iter for iter in range(len(X))] | |||||
inputs = {} | |||||
for i in use_columns: | |||||
inputs['col_'+str(i)] = list(X[i]) | |||||
inputs = container.DataFrame(inputs, columns=list(inputs.keys()), generate_metadata=True) | |||||
return inputs | |||||
def set_training_data(self, data): | |||||
return self.primitive.set_training_data(inputs=data) | |||||
def fit(self, data): | |||||
if not self.fit_available: | |||||
raise AttributeError('type object ' + self.__class__.__name__ + ' has no attribute \'fit\'') | |||||
data = self.transform(data) | |||||
self.set_training_data(data) | |||||
return self.primitive.fit() | |||||
def predict(self, data): | |||||
if not self.predict_available: | |||||
raise AttributeError('type object ' + self.__class__.__name__ + ' has no attribute \'predict\'') | |||||
data = self.transform(data) | |||||
return self.primitive.produce(inputs=data).value.values | |||||
def predict_score(self, data): | |||||
if not self.predict_available: | |||||
raise AttributeError('type object ' + self.__class__.__name__ + ' has no attribute \'predict_score\'') | |||||
data = self.transform(data) | |||||
return self.primitive.produce_score(inputs=data).value.values | |||||
def produce(self, data): #produce function for other primitive types | |||||
if not self.produce_available: | |||||
raise AttributeError('type object ' + self.__class__.__name__ + ' has no attribute \'produce\'') | |||||
data = self.transform(data) | |||||
return self.primitive.produce(inputs=data).value.values | |||||
""" | |||||
if __name__ == '__main__': | |||||
import numpy as np | |||||
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 = SKInterface(AutoRegODetectorPrimitive, contamination=0.2, window_size=2) | |||||
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) | |||||
""" | |||||
""" | |||||
def transform(self, X): | |||||
inputs = {} | |||||
for i in range(len(X)): | |||||
inputs['col_'+str(i)] = list(X[i]) | |||||
inputs = container.DataFrame(inputs, columns=list(inputs.keys()), generate_metadata=True) | |||||
outputs = self.primitive.produce(inputs=inputs).value.to_numpy() | |||||
return outputs | |||||
'contamination': contamination, | |||||
'use_columns': use_columns, | |||||
'return_result': return_result, | |||||
""" | |||||
#use_columns=(-1,), contamination=0.1, return_result='append' |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodABOD import ABODPrimitive | |||||
class ABODSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=ABODPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodAE import AutoEncoderPrimitive | |||||
class AutoEncoderSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=AutoEncoderPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.AutoRegODetect import AutoRegODetectorPrimitive | |||||
class AutoRegODetectorSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=AutoRegODetectorPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodCBLOF import CBLOFPrimitive | |||||
class CBLOFSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=CBLOFPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodCOF import COFPrimitive | |||||
class COFSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=COFPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.DeepLog import DeepLogPrimitive | |||||
class DeepLogSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=DeepLogPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.Ensemble import EnsemblePrimitive | |||||
class EnsembleSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=EnsemblePrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodHBOS import HBOSPrimitive | |||||
class HBOSSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=HBOSPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodIsolationForest import IsolationForestPrimitive | |||||
class IsolationForestSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=IsolationForestPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.KDiscordODetect import KDiscordODetectorPrimitive | |||||
class KDiscordODetectorSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=KDiscordODetectorPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodKNN import KNNPrimitive | |||||
class KNNSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=KNNPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodLODA import LODAPrimitive | |||||
class LODASKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=LODAPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodLOF import LOFPrimitive | |||||
class LOFSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=LOFPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.LSTMODetect import LSTMODetectorPrimitive | |||||
class LSTMODetectorSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=LSTMODetectorPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.MatrixProfile import MatrixProfilePrimitive | |||||
class MatrixProfileSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=MatrixProfilePrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodMoGaal import Mo_GaalPrimitive | |||||
class Mo_GaalSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=Mo_GaalPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodOCSVM import OCSVMPrimitive | |||||
class OCSVMSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=OCSVMPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PCAODetect import PCAODetectorPrimitive | |||||
class PCAODetectorSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=PCAODetectorPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodSOD import SODPrimitive | |||||
class SODSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=SODPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodSoGaal import So_GaalPrimitive | |||||
class So_GaalSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=So_GaalPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.SystemWiseDetection import SystemWiseDetectionPrimitive | |||||
class SystemWiseDetectionSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=SystemWiseDetectionPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.Telemanom import TelemanomPrimitive | |||||
class TelemanomSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=TelemanomPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.detection_algorithm.PyodVAE import VariationalAutoEncoderPrimitive | |||||
class VariationalAutoEncoderSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=VariationalAutoEncoderPrimitive, **hyperparams) | |||||
self.fit_available = True | |||||
self.predict_available = True | |||||
self.produce_available = False |
@@ -0,0 +1,10 @@ | |||||
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) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.BKFilter import BKFilterPrimitive | |||||
class BKFilterSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=BKFilterPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.DiscreteCosineTransform import DiscreteCosineTransformPrimitive | |||||
class DiscreteCosineTransformSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=DiscreteCosineTransformPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.FastFourierTransform import FastFourierTransformPrimitive | |||||
class FastFourierTransformSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=FastFourierTransformPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.HPFilter import HPFilterPrimitive | |||||
class HPFilterSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=HPFilterPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.NonNegativeMatrixFactorization import NonNegativeMatrixFactorizationPrimitive | |||||
class NonNegativeMatrixFactorizationSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=NonNegativeMatrixFactorizationPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.SKTruncatedSVD import SKTruncatedSVDPrimitive | |||||
class SKTruncatedSVDSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=SKTruncatedSVDPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.SpectralResidualTransform import SpectralResidualTransformPrimitive | |||||
class SpectralResidualTransformSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=SpectralResidualTransformPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.StatisticalAbsEnergy import StatisticalAbsEnergyPrimitive | |||||
class StatisticalAbsEnergySKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=StatisticalAbsEnergyPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.StatisticalAbsSum import StatisticalAbsSumPrimitive | |||||
class StatisticalAbsSumSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=StatisticalAbsSumPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.StatisticalGmean import StatisticalGmeanPrimitive | |||||
class StatisticalGmeanSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=StatisticalGmeanPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.StatisticalHmean import StatisticalHmeanPrimitive | |||||
class StatisticalHmeanSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=StatisticalHmeanPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |
@@ -0,0 +1,10 @@ | |||||
import numpy as np | |||||
from ..Base_skinterface import BaseSKI | |||||
from tods.feature_analysis.StatisticalKurtosis import StatisticalKurtosisPrimitive | |||||
class StatisticalKurtosisSKI(BaseSKI): | |||||
def __init__(self, **hyperparams): | |||||
super().__init__(primitive=StatisticalKurtosisPrimitive, **hyperparams) | |||||
self.fit_available = False | |||||
self.predict_available = False | |||||
self.produce_available = True |