This is the official implementation of our paper Multinomial Random Forest, accepted by the Pattern Recognition (2021).
This package is developed with Python 3.x, please make sure all the dependencies are installed, which is specified in requirements.txt. Please run the following command to install dependencies before running the code:
pip install -r requirements.txt.
<file name> | <description> |
---|---|
data/car.data | Data used in the demo. |
demo.py | Example of MRF training and test. |
DecisionNode.py | Implementation of node that makes up the tree. |
Tree.py | Implementation of tree classifier. |
MultinomialRF.py | Implementation of MRF classifier. |
utils.py | Utils used in the above codes. |
To run the demo (with default parameters), simply run demo.py by
python3 demo.py
Modify the parameter CROSS_VALIDATION = True to run the cross validation.
If our work or this repo is useful for your research, please cite our paper as follows:
@article{bai2021multinomial,
title={Multinomial Random Forest},
author={Bai, Jiawang and Li, Yiming and Li, Jiawei and Yang, Xue and Jiang, Yong and Xia, Shu-Tao},
journal={Pattern Recognition},
pages={108331},
year={2021},
publisher={Elsevier}
}