Skip to content

neroyouqiang/DiGraphWave

Repository files navigation

1. Input data

Please move the graph files into the folder "./data/". One file represents one graph.
For the graph file, the first line is the label of the vertices. The labels of the vertexes are integers from 1. The other lines are the adjacent matrix of the graph. The number in the same line is separated by ",". Following is an example:

Content of 01.csv

1,1,2,1,1,4,1
0,0,1,0,0,0,0
0,0,1,0,0,0,0
0,0,0,1,0,0,0
0,0,0,0,0,1,0
0,0,0,0,0,1,0
0,0,0,0,0,0,1
0,0,0,0,0,0,0

Interpretation of 01.csv

The vertices are
[1,1,2,1,1,4,1]

The adjacent matrix is
[[0, 0, 1, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 0, 0]]

2. Run

Graph spectral analysis approach

python main_wavelet.py [-h] [--relabel] [--cal_distance]

-h, --help      show this help message and exit
--relabel       Whether to relabel the vertice or not. Default: True.
--cal_distance  Whether to calculate the distance between the embedded vertice or not. Default: True.

Datamining approach

python main_datamining.py [-h] [--min_support MIN_SUPPORT] [--max_size MAX_SIZE]

-h, --help                 show this help message and exit
--min_support MIN_SUPPORT  Minimum suport of the frequent subgraph. Default: 1.0.                
--max_size MAX_SIZE        Maximum size of the common subgraph. -1 means not limited. Default: -1.

Releases

No releases published

Packages

No packages published

Languages