README.md

July 24, 2024 · View on GitHub

Code: code is available under the folder code/.
Data: data is available under the folder code/data/.


Requirements:
Python 3.9.19
Scikit-network 0.32.1
Numpy 1.26.4
Scipy 1.12.0
Scikit-learn 1.3.0
Psutil 6.0.0
PyYAML 6.0.1
PyTorch 1.11.0
Torch-geometric 2.5.3


Usage:
Run the method AHRC by executing
python AHRC.py --dataset coau_cora
The --dataset argument should be one of the available datasets.

Other parameters are optional:
--alpha: The restart probability in the α,γ\alpha, \gamma-hypergraph random walk. The default value is 0.2.
--gamma: The maximum length of α,γ\alpha, \gamma-hypergraph random walk. The default value is 2.
--tau: The number of spanning forest sparsification iterations. The default value is 3.
--timer: A boolean variable. Set to True to calculate the average running time of the algorithm. The default value is False.

Run the method GRC+ by going to the folder GRCPLUS/ then executing
python train.py --dataset coau_cora
The --dataset argument should be one of the available datasets.

Other hyperparameters are optional:
--p_e: The probability of each edge being removed.
--p_a: The probability of each attribute being removed.
--lr: The learning rate.

Run the method TCL+ by going to the folder TCLPLUS/ then executing
python train.py --dataset coau_cora
The --dataset argument should be one of the available datasets.

Other hyperparameters are optional:
--p_d: The probability of each entry in ISM being set to zero.
--lr: The learning rate.


Examples:

Example-1
Evaluate the clustering results of AHRC on dataset coau_cora
python AHRC.py --dataset coau_cora

Output:
The metric scores obtained would be saved in the file output_metrics.txt under the folder code/.

Example-2
Evaluate the clustering results of AHRC on dataset coci_cora
python AHRC.py --dataset coci_cora

Output:
The metric scores obtained would be saved in the file output_metrics.txt under the folder code/.

Example-3:
Calculate the average running time of AHRC on dataset coau_cora.
python AHRC.py --dataset coau_cora --timer True

Output:
The running time would be saved in the file output_time.txt under the folder code/.

Example-4:
Evaluate the clustering results of GRC+ on dataset coci_cora
python train.py --dataset coci_cora

Output:
The metric scores obtained would be saved in the file GRCPLUS.txt under the folder data/coci_cora/results/.

Example-5:
Evaluate the clustering results of TCL+ on dataset coau_cora
python train.py --dataset coau_cora

Output:
The metric scores obtained would be saved in the file TCLPLUS.txt under the folder data/coau_cora/results/.