Maintainer: Manuel López-Ibáñez
The empirical attainment function (EAF) describes the probabilistic distribution of the outcomes obtained by a stochastic algorithm in the objective space. This R package implements plots of summary attainment surfaces and differences between the first-order EAFs. These plots may be used for exploring the performance of stochastic local search algorithms for biobjective optimization problems and help in identifying certain algorithmic behaviors in a graphical way.
The corresponding book chapter  explains the use of these visualization tools and illustrates them with examples arising from practice.
In addition, the package provides functions for computing several quality metrics, such as hypervolume, IGD, IGD+, and epsilon.
Keywords: empirical attainment function, summary attainment surfaces, EAF differences, multi-objective optimization, bi-objective optimization, performance measures, performance assessment, graphical analysis, visualization.
The software is implemented as an R package, but the code for only computing the EAF is available as a C program, and it does not require installing R or any R packages. Just download the package source code, uncompress it, and look for the directory
src/eaf. This code can be used to implement your own visualizations instead of the visualizations provided by the eaf package. Compiled binaries can be found under
system.file(package="eaf", "bin"). Other useful binaries can be found there.
The visualization of the EAFs requires installing the eaf package. Therefore, a basic knowledge of R is recommended to make use of all features. However, the
eaf package contains two Perl scripts that allow to generate standard plots without any R knowledge. See
inst/scripts/eafdiff/ in the package source code. The scripts use the eaf package internally to generate the plots, and, hence, the eaf package must be installed and working.
The first step before installing the eaf package is to install R. Once R is installed in the system, there are two methods for installing the eaf package:
Install within R (automatic download, internet connection required). Invoke R, then
<package> is one of the three versions available:
.tgz (MacOS X), or
Search the R documentation if you need more help to install an R package on your system.
If you wish to be notified of bugfixes and new versions, please subscribe to the low-volume emo-list, where announcements will be made.
Once the eaf package is installed, the following R commands will give more information:
Apart from the main R package, the source code contains the following extras in the directory
inst/ (after installation, these files can be found at the directory printed by the R command
scripts/eafplot: Perl script to plot summary attainment surfaces.
scripts/eafdiff: Perl script to plot the differences between the EAFs of two input sets.
extdata/: Examples of utilization of the above programs. These are discussed in the corresponding book chapter .
In addition, the source code contains the following under
src/eaf: This C program computes the empirical attainment function in 2 dimensions. It is NOT required by the other programs, but it is provided as a useful command-line utility. This version is based on the original code written by Carlos M. Fonseca available at http://www.tik.ee.ethz.ch/pisa/. Another version of the code that handles three dimensions is available at Prof. Fonseca’s website.
src/mo-tools: Several tools for working with multi-objective data.
For more information, consult the
README files at each subdirectory.
Thanks to rpy2, you can use the
eaf package from Python. A complete example would be:
import os import subprocess import sys os.environ['RPY2_CFFI_MODE'] = "API" # bug in cffi 1.13.0 https://bitbucket.org/rpy2/rpy2/issues/591/runtimeerror-found-a-situation-in-which-we # Tested with rpy2 2.9.2-1 import numpy as np from rpy2.robjects.packages import importr from rpy2.robjects import r as R from rpy2.robjects import numpy2ri numpy2ri.activate() from rpy2.interactive import process_revents process_revents.start() eaf = importr("eaf") path = R('system.file(package="eaf", "extdata")') + "/" alg1 = eaf.read_data_sets_(path + "ALG_1_dat") alg1 = np.asarray(alg1) alg2 = np.asarray(eaf.read_data_sets_(path + "ALG_2_dat")) eaf.eafplot(alg1[:, 0:2], sets=alg1[:,2]) input("Press ENTER to see next plot: ") eaf.eafdiffplot(alg1, alg2, title_left="A", title_right="B")
This software is Copyright (C) 2011-2019 Carlos M. Fonseca, Luís Paquete, Thomas Stützle, Manuel López-Ibáñez and Marco Chiarandini.
This program is free software (software libre); you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
IMPORTANT NOTE: Please be aware that the fact that this program is released as Free Software does not excuse you from scientific propriety, which obligates you to give appropriate credit! If you write a scientific paper describing research that made substantive use of this program, it is your obligation as a scientist to (a) mention the fashion in which this software was used in the Methods section; (b) mention the algorithm in the References section. The appropriate citation is:
Moreover, as a personal note, I would appreciate it if you would email
email@example.com with citations of papers referencing this work so I can mention them to my funding agent and tenure committee.