**PARD: Partial Multi-Label Learning with Probabilistic Graphical Disambiguation**

Jun-Yi Hang, Min-Ling Zhang

*Accepted by NeurIPS 2023*



*This code package can be used freely for academic, non-profit purposes. For other usage,  please contact us for further information (Prof. Min-Ling Zhang: zhangml@seu.edu.cn ).*

## Requirements

* Python 3.8.3
* Pytorch 1.6.0
* torchnet 0.4.0
* scikit-learn 0.23.1
* numpy 1.18.5

## Usage

### Download and Prepare the Data

All data sets can be downloaded from the Google [drive](https://drive.google.com/file/d/1jsEe8s2L2zeEFq_4dyr8M8DQU10gErms/view?usp=sharing).

Download and then unrar the data into the current directory.

### Train and Test PARD

For example, to perform 10-fold cross validation on *corel5k* data set (noise level $\gamma=100$):

```
python PARD_10-fold_cv.py cv_exp -dataset corel5k -n 1.0 -alpha 10 -lr 1e-3 -max_epoch 50 -cuda
```

### Hyperparameters for More Data Sets

We provide tuned hyperparameters for all the 25 data sets used in the paper. To perform 10-fold cross validation with these provided hyperparameters:

```
python PARD_10-fold_cv.py cv_exp -dataset corel5k -n 1.0 -default_cfg -cuda
```

### Running on Additional Data Sets

To run PARD on data sets in addition to the 25 data sets used in the paper, one needs to write a simple interface for loading data set. Please check the `dataset.py` file under `Cores` folder for some examples.

