diff --git a/examples/sklearn_interface/ABOD_skitest.py b/examples/sklearn_interface/ABOD_skitest.py new file mode 100644 index 0000000..fe33576 --- /dev/null +++ b/examples/sklearn_interface/ABOD_skitest.py @@ -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)