This repository contains the source code associated with the paper "Transfer Learning Analysis for Landscape-Aware Algorithm Selection", which analyzed the results of a transfer learning machine learning model for automatic algorithm selection using Exploratory Landscape Analysis.
The majority of the source code is written in R, and requires the following libraries.
- robustbase
- stringr
- randomForest
- R.matlab
- ggplot2
- ggcorplot
The shapley calculation is written in python, and requires the following libraries:
- scikit-learn
- shap
- pandas
The repository contains the following folders
Contains all of the raw landscape feature data that is used for training and testing the machine learning models. Due to the large number of files, the features are stored as a compressed archive.
The files are named as {iter}_{function_number}_samples_{algorithm}_250_.mat.RDS, where iter is the iteration of the sampling, function_number is the ID of the function on which the features were calculated, and algorithm is the best performing algorithm (the prediction class).
The landscape features are saved as plain R objects, and can be loaded from R using the function readRDS.
Further, the processed folder contains two files containing the preprocessed features that can be used directly for machine learning.
Contains the code used to train and test the machine learning model, with each individual model as its own R file.
Contains the code used for the calculation of the shapley values.
Contains the visualizations of the shapley values.
Contains the code for the visualization of the data.
Contains the matlab data that was used to process problem samples and determine the best performing algorithms on each COCO problems. Requires the code from https://github.com/bimk/algorithm-recommendation for the artificial problem generator (generate.m) and to evaluate the best performing algorithms. This code should be placed to the matlab folder.
The code for processing COCO problems (coco_get_best.m and coco_evaluate.m ) is based on examples from https://github.com/numbbo/coco and requires the COCO platform to be set up following the instructions in the repository.