GithubHelp home page GithubHelp logo

hazedt / phmgnnbenchmark Goto Github PK

View Code? Open in Web Editor NEW
188.0 2.0 41.0 2.34 MB

this code library is mainly about applying graph neural networks to intelligent diagnostic and prognostic.

Python 100.00%
graph-neural-networks diagnostic-and-prognostic

phmgnnbenchmark's Introduction

PHMGNNBenchmark

PHMGNNBenchmark

Implementation of the paper:

Paper:

@article{PHMGNNBenchmark,
  title={The emerging graph neural networks for intelligent fault diagnostics and prognostics: A guideline and a benchmark study},
  author = {Tianfu Li and Zheng Zhou and Sinan Li and Chuang Sun and Ruqiang Yan and Xuefeng Chen},
  journal={Mechanical Systems and Signal Processing},
  volume = {168},
  pages = {108653},
  year = {2022},
  issn = {0888-3270},
  doi = {https://doi.org/10.1016/j.ymssp.2021.108653},
  url = {https://www.sciencedirect.com/science/article/pii/S0888327021009791},
}

PHMGNNBenchmark

Requirements

  • Python 3.8 or newer
  • torch-geometric 1.6.1
  • pytorch 1.6.0
  • pandas 1.0.5
  • numpy 1.18.5

Guide

We provide a novel intelligent fault diagnostics and prognostics framework based on GNNs. The framework consists of two branches, that is, the node-level fault diagnostics architecture and graph-level fault diagnostics or regression architecture. In node-level fault diagnosis, each node of a graph is considered as a sample, while the entire graph is considered as a sample in graph-level fault diagnosis.
In this code library, we provide three graph constrcution methods (KnnGraph, RadiusGraph, and PathGraph), and two different input types (Frequency domain and time domain). Besides, seven GNNs and four graph pooling methods are implemented.

Pakages

  • datasets contians the data load method for different dataset
  • model contians the implemented model for nodel-level task
  • model2 contians the implemented model for graph-level rask

Run the code

For fault diagnostic

  • Node level fault daignostic
    python ./train_graph_diagnosis.py --model_name GCN --data_name XJTUGearboxRadius --data_dir ./data/XJTUGearbox/XJTUGearboxRadius.pkl --Input_type TD --task Node --checkpoint_dir ./checkpoint
  • Graph level fault daignostic
    python ./train_graph_diagnosis.py --model_name GCN --data_name XJTUGearboxRadius --data_dir ./data/XJTUGearbox --Input_type TD --task Graph --pooltype EdgePool --checkpoint_dir ./checkpoint

For prognostic

python ./train_graph_prognosis.py --model_name GCN --pooltype EdgePool --data_name CMAPSS_graph --data_file FD001 --data_dir ./data/CMAPSS/ --checkpoint_dir ./checkpoint/FD001

The data for runing the demo

In order to facilitate your implementation, we give some processed data here for node level-fault diagnosis and graph-level prognosis Data for demo.

Datasets

Fault diagnostic datasets

Self-collected datasets

Open source datasets

Prognostic datasets

Note

This code library is run under the windows operating system. If you run under the linux operating system, you need to delete the ‘/tmp’ before the path in the dataset to avoid path errors.

Related works

phmgnnbenchmark's People

Contributors

hazedt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

phmgnnbenchmark's Issues

utils\train_graph_utils.py的bug

作者您好,标题的文件中for data in self.dataloaders[phase]:这行代码报错,原因为RuntimeError: The 'data' object was created by an older version of PyG. If this error occurred while loading an already existing dataset, remove the 'processed/' directory in the dataset's root folder and try again.
请问是PyG的版本太高了吗,我用的PyG版本为2.0.1,盼回复!

图片节点的图分类及传感器的选择问题

作者您好,如果每个节点的输入形式是图片(目前主流算法好像都是默认每个节点的特征都是向量形式的),有没有办法直接对这些图片节点进行类似图卷积的操作,然后再进行graph级别的分类呢?
另外一个问题是如果想要对图上的节点(传感器)进行筛选,这个任务目前有相关办法解决嘛?

预处理CMAPSS数据集

作者您好,想问一下对于CMAPSS寿命预测数据集,如何对其进行预处理得到相应的 edge_index_FD001.npy 和 train_FD001.pkl 文件?有源代码嘛?

about test.py

Hi, Authors!
I wonder if the testing is included in the code. I only saw the training is in the Python file named train_graph_diagnosis.
If the testing is included in the code, could you please tell me which file the corresponding code for testing is in?
Thank you!!

consult testing

Hi, Authors!
I wonder if the testing is included in the code. I only saw the training is in the Python file named train_graph_diagnosis.
If the testing is included in the code, could you please tell me which file the corresponding code for testing is in?
Thank you!!

初学小白不知道如何运行

我在第一次运行的时候train_graph_diagnosis.py 报错
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: './checkpoint\Node_ChebyNet_XJTUGearboxKnn_TD_1102-153115'

运行train_graph_prognosis.py 报错
FileNotFoundError: [Errno 2] No such file or directory: './data/CMAPSS/edge_index_FD001.npy'

多传感器数据运行

您好,如果需要使用多传感器数据集是否需要自己修改代码,在源代码里面没有看见如何处理多传感器数据的,但是文章中提及了将多变量时序数据中每个传感器视为一个节点

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.