SkillAgentSearch skills...

MARGOT

Source code of the paper "Margin Optimal Classification Trees"

Install / Use

/learn @m-monaci/MARGOT
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

<!-- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) --> <!-- * [MIT License](https://opensource.org/licenses/mit-license.php) --> <!-- * Copyright 2022 © Marta Monaci, Federico D'Onofrio -->

Related Skills

View on GitHub
GitHub Stars7
CategoryCustomer
Updated10mo ago
Forks0

Languages

Python

Security Score

67/100

Audited on May 20, 2025

No findings