Skip to content

m-monaci/MARGOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MARGOT

This repository contains the source code and the data related to the paper Margin Optimal Classification Trees by Federico D'Onofrio, Giorgio Grani, Marta Monaci and Laura Palagi.

@article{donofrio2024margin,
title = {Margin optimal classification trees},
journal = {Computers & Operations Research},
volume = {161},
pages = {106441},
year = {2024},
issn = {0305-0548},
doi = {https://doi.org/10.1016/j.cor.2023.106441},
author = {Federico D’Onofrio and Giorgio Grani and Marta Monaci and Laura Palagi}
}

Installation

The MIP model for generating MARGOT Trees is implemented in Gurobi Optimizer.

Requirements

The file requirements.txt reports the list of packages that must be installed to run the code. You can add a package to your environment via pip or anaconda using either pip install "package" or conda install "package".

Then, in order to install pygraphviz, we reccomend to use conda install -c conda-forge pygraphviz.

Configuration and running

You just need to run main.py. The parameters are set according to the experiments in the paper, but you can simply modify them via main.py.

Results

The output of the experiments can be found in folder results_margot/, where:

  • folder plots/ will contain all the tree plots files related to the experiments performed.
  • file stats_margot.xlsx will contain the statistics of all the experiments performed.

Team

Contributors to this code:

License

License: MIT

  • MIT License
  • Copyright 2022 © Marta Monaci, Federico D'Onofrio