An implementation of binary decision tree with fringe-features extraction.
This repository contains one of the methods we used in the IWLS 2020 Programming Contest. We train a binary binary decision tree with fringe-features extraction proposed in [1][2], and convert it into a Boolean logic circuit. You may also refer to the contest description, our DATE'19 paper [3] (written with other contestants) and the project page for more details.
Before running the program, please make sure you have the required pip packages installed.
pip3 install -r requirements.txt
The training and validation data should be in PLA format.
You can download the contest benchmarks via this link.
To save the learned binary decision tree model, you can write it into a pickle file with the --save_model
flag, and/or dump it into a logic circuit in BLIF format with the --dump_blif
flag.
Below is an example to run our program.
You can use the --help
flag to see a more detailed usage.
python3 main.py --train_data benchmarks/train/ex00.train.pla --valid_data benchmarks/validation/ex00.valid.pla --save_model ex00_model.pk --dump_blif ex00_model.blif
[1] G. Pagallo and D. Haussler, “Boolean Feature Discovery in Empirical Learning,” Machine Learning, vol. 5, no. 1, p. 71–99, 1990.
[2] A. L. Oliveira and A. Sangiovanni-Vincentelli, “Learning Complex Boolean Functions: Algorithms and Applications,” in Proc. NeurIPS, p. 911–918, 1993.
[3] S. Rai et al., "Logic Synthesis Meets Machine Learning: Trading Exactness for Generalization," in Proc. DATE, 2021.
You are welcome to create an issue to make suggestions, ask questions, or report bugs, etc.