QinghaiZheng1992 / DRAM-TMLR

Implementation of "Predicting Label Distribution from Tie-Allowed Multi-Label Ranking"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DRAM

DRAM: A framework for predicting label distribution from tie-allowed multi-label ranking via conditional Dirichlet mixtures

Requirements

python=3.7.6, numpy=1.21.6, pandas=1.3.5, scikit-learn=0.24.2, scipy=1.7.3, pytorch=1.13.0+cpu, functools

Reproducing

Change the directory to this project and run the following command in terminal.

python demo.py

Usage

Here is a simple example of using DRAM.

from dram import DRAM_LP
from sklearn.model_selection import train_test_split
from utils import report, reduce_label_distributions

X, D = load_dataset('sj') # this api should be defined by users
R, Y = reduce_label_distributions(D)
Xr, Xs, Rr, _, Yr, _, _, Ds = train_test_split(X, R, Y, D)

# training DRAM-LP
dramlp = DRAM_LP().fit(Xr, Rr, Yr) # X: feature matrix; R: rank matrix; Y: logical matrix
# show the predictive performance
Dhat = dramlp.predict(Xs)
report(Dhat, Ds)

Paper

@article{Lu2023-DRAM_TMLR,
  author={Lu, Yunan and Li, Weiwei and Li, Huaxiong and Jia, Xiuyi},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={Predicting Label Distribution From Tie-Allowed Multi-Label Ranking}, 
  year={2023},
  volume={},
  number={},
  pages={1-15},
}

About

Implementation of "Predicting Label Distribution from Tie-Allowed Multi-Label Ranking"


Languages

Language:Python 100.0%