This repo contains the extension from previous supervised work (Repo) for applying Simple Siam (https://arxiv.org/abs/2011.10566) for anomaly detection and evaluating subsequent diagnosis approaches by using a knowledge graph in the context of predictive maintenance.
The repo implements query strategies and different knowledge-based retrieval approaches (SPARQL queries, Symbolic-driven Neural Reasoning based on Knowedge Gralph Embeddings, Case-based Reasoning) that aim to find the root cause (i.e. data sets label or affected component).
The implementation is for research purposes, structure is not optimal because it grew with the ideas and findings made during the investigations.
Repo Head: d35d1237
Repo Head: d35d1237 | All false beside: q8, is_siam, use_only_true_positive_pred | Use the results of the anomaly detection model below the comment: # THIS ONE IS USED:
Checkout Reviosn Number: fc2813ad23ebe12fd7d310b60370b2b34c64192d All false beside: All false beside: q8, is_siam, use_only_true_positive_pred, use_cbr | Use the results of the anomaly detection model below the comment: # THIS ONE IS USED:
- The detailed logs for each of those experiments
- The raw data recorded with this simulation factory model used to generate the training and evaluation data sets.
- The preprocessed data set we used for the evaluation.
- Clone the repository
- Download the preprocessed data set and move it to the data folder
- For (data-driven) Anomaly Detection with Siam CNN2D+GCN+GSL (best model): Navigate to the neural_network folder and start the training and test procedure via python TrainAndTest.pyTrainSelectAndTest_Ano_Intermediate_raw.py > Log.txt
- For (knowledge-based) Anomaly Diagnosis: Navigate to the neural_network folder and start Diagnosis_Eval.py
Used python version: 3.6.X
Used packages: See requirements.txt
CPU | 2x 40x Intel Xeon Gold 6138 @ 2.00GHz |
RAM | 12 x 64 GB Micron DDR4 |
GPU | 1 x NVIDIA Tesla V100 32 GB GPUs |
- All settings can be adjusted in the script Configuration.py, whereby some rarely changed variables are stored in the file config.json, which is read in during the initialization.
- The hyperparameters of the neural networks can be defined in the script Hyperparameter.py or can be imported from a file in configuration/hyperparameter_combinations/ (this can also be changed in the configuration).
- For training, the desired adjustments should first be made at the parts mentioned above and then the training can be started by running Training.py.
- The evaluation of a trained model on the test dataset can be done via Inference.py. To do this, the folder which contains the model files, must first be specified in the configuration.
- The data/ directory contains all required data. Central are the pre-processed training data in data/training_data/ and the trained models in data/trained_models/.
The following section gives an overview of the packages, directories and included Python scripts in this repository.