MARGOT
Source code of the paper "Margin Optimal Classification Trees"
Install / Use
/learn @m-monaci/MARGOTREADME
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
The software is for academic purposes only, see also the file LICENSE provided.
<!-- [](https://opensource.org/licenses/MIT) --> <!-- * [MIT License](https://opensource.org/licenses/mit-license.php) --> <!-- * Copyright 2022 © Marta Monaci, Federico D'Onofrio -->Related Skills
openhue
339.3kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
339.3kElevenLabs text-to-speech with mac-style say UX.
weather
339.3kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.5kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
