Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.41 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.41 KB

MotifPiece

MotifPiece Algorithm

MotifPiece Algorithm

Heterogeneous Graph Learning Module

Heterogeneous Graph Learning Module

Cross Datasets Learning Module

Cross Datasets Learning Module

Installation

Environment setup

We highly recommend installing Anaconda for a simple environment setup and management.

Download our project:

git clone https://github.com/ZhaoningYu1996/MotifPiece.git
cd MotifPiece

Create a virtual environment with requirement packages:

conda env create -f environment.yml

Activate the virtual environment:

conda activate motifpiece

Usage

To reproduce the results of running single dataset from the paper:

python main.py --data_name --threshold --score_method --merge_method --decomposition_method

To reproduce the results of cross datasets learning from the paper:

python cross_dataset_mol.py   # Datasets in MoleculeNet
python cross_dataset_ptc.py   # PTC datasets

To apply MotifPiece and extract motifs on a personal SMILES representation dataset, you can use MotifPiece class in motifpiece.py:

motifpiece = MotifPiece(*args)

In *args, you can setup threshold, score_method, and merge_method. You can also setup train_indices to only extract motifs from the training set.