Multi-Label Classification based on Sum-Product Networks
Use the implementations:
LearnSPN and SPN-AL, SPN-AC as presented in:
_A. Vergari, N. Di Mauro, andF. Esposito_
**Simplifying, Regularizing and Strengthening Sum-Product Network Structure Learning** at ECML-PKDD 2015.
Libra toolkit presented in:
_D. Lowd and A. Rooshenas_
**The Libra Toolkit for Probabilistic Models** in Journal of Machine Learning Research 2015.
MLC-SPN is build upon python3 numpy, sklearn, scipy, numba, matplotlib and theano, and the LibraToolkit, after the installation of the LibraToolkit also need to repleace the files in /.opam/system/bin/ by all files at MLC-SPN/libra/bin of the repository, for obtain the MPE approximate inference with ID.
To run the algorithm execute :
python3 classify.py -dataset flags -nl 7 -ml ac -ap psc -psm all --folds
python3 classify.py -dataset flags0 -nl 7 -ml ac -ap sc -io s
Parameters:
[-dataset] Dataset name (Only use datasets whose contents are binary values).
[-nl] Labels number in the dataset.
[-ml] SPN learning methods (al,ac,id).
[-ap] Multi-Label classification approach (br,cc,mpe,ec, sc, psc,pec).
[-psm] Only for Pool Classification approach (psc, pec), defines the method for obtaing a single classification (all, av,vt,max).
[-io] Only for Sequential Classification apporach (sc), defines the method for obtain the order (r,s,d).
[--folds] Find and process the 5-folds for training and classification (dataset+nfold).
[--bagg] Use bagging, only for the methods al and ac.
Several datasets are provided in the data/
folder.