MO-LightGBM is a gradient boosting framework based on decision tree algorithms, used for multi-label learning to rank tasks. It is based on LightGBM.
- Python 3.8 or higher
- matplotlib
- seaborn
-
Install blas and lapack,
- In mac:
$brew install openblas $brew install lapack
- In Debian-based systems like Ubuntu:
$sudo apt install libblas-dev liblapack-dev
- In Red Hat systems like CentOS and Fedora:
$sudo yum install lapack-devel blas-devel
- In mac:
-
From the scs root, build the package, install cmake if needed
cd LightGBM/external_libs/scs/ rm -r build mkdir build cd build cmake .. make -j$(nproc) cd ../../../../
-
From the ecos root, build the package
cd LightGBM/external_libs/ecos.2.0.8/ rm -r build mkdir build cd build cmake .. make -j$(nproc) cd ../../../../
-
Now build LightGBM
cd LightGBM rm -r build mkdir build cd build cmake .. make -j$(nproc) cd ../../
It is fully tested with Red Hat systems.
- The dataset should be in csv or tsv format, not in the libsvm format.
- The csv/tsv file should have header that names each column
-
Prepare the
<dataset_name>_config.yml
-
Generate configure files for baseline experiment
python baselines.py <dataset_name>_config.yml
-
Go to the
baseline_results
folder and run the experimentscd results_${dataset}/lambdarank/baseline_results sh run_experiment.sh
-
Generate configure files for biobjective experiments for preference based methods
python biobjectives.py <dataset_name>_config.yml
-
Go to the
biobjective_results
folder, and, either run all the experiments or run for individual combinatorcd results_${dataset}/lambdarank/biobjective_results sh run_experiment.sh # will run for the all combinators sh epo_search_run_experiment.sh # will run only for epo_search
-
Generate configure files for biobjective experiments for constraints based methods
python biobjectives_ec.py <dataset_name>_config.yml
-
Go to the
biobjective_results
folder, and, either run all the experiments or run for individual combinatorcd results_${dataset}/lambdarank/biobjective_results sh ec_run_experiment.sh # will run for the all combinators
-
[optional] Run plotting script
- Plot bound and ray in one figure
python plot_biobjectives.py <dataset_name>_config.yml
- Plot bound and ray in one figure
dataset=istella
root=/home/user/MO-LightGBM/
folder=${root}/example/
cd ${folder}
python baselines.py ${dataset}_config.yml
cd results_${dataset}/lambdarank/baseline_results
sh run_experiment.sh
cd ${folder}
python biobjectives.py ${dataset}_config.yml
cd results_${dataset}/lambdarank/biobjective_results
sh run_experiment.sh
cd ${folder}
python biobjectives_ec.py ${dataset}_config.yml
cd results_${dataset}/lambdarank/biobjective_results
sh ec_run_experiment.sh
cd ${folder}
python plot_biobjectives.py ${dataset}_config.yml
If you use this work, or otherwise found our work valuable, please consider citing the papers:
Multi-Label Learning to Rank through Multi-Objective Optimization
@article{chaoshengmo-lightgbm2025,
title={MO-LightGBM: A Library for Multi-objective Learning to Rank with LightGBM},
author={Dong, Chaosheng and Momma, Michinari},
year={2025}
}
@inproceedings{mahapatra2023multi,
title={Multi-label learning to rank through multi-objective optimization},
author={Mahapatra, Debabrata and Dong, Chaosheng and Chen, Yetian and Momma, Michinari},
booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
year={2023}
}
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.