{"id":16274759,"url":"https://github.com/mlopez-ibanez/eaf","last_synced_at":"2025-03-16T13:31:19.996Z","repository":{"id":41329917,"uuid":"126227030","full_name":"MLopez-Ibanez/eaf","owner":"MLopez-Ibanez","description":"R package for plotting the Empirical Attainment Function","archived":false,"fork":false,"pushed_at":"2024-08-19T18:56:43.000Z","size":26553,"stargazers_count":17,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T12:46:38.137Z","etag":null,"topics":["eaf","eaf-differences","epsilon","hypervolume","inverted-generational-distance","multiobjective-optimization","r","summary-attainment-surfaces","visualization"],"latest_commit_sha":null,"homepage":"http://lopez-ibanez.eu/eaftools","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MLopez-Ibanez.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T18:59:25.000Z","updated_at":"2025-01-11T10:42:05.000Z","dependencies_parsed_at":"2024-08-19T09:32:49.468Z","dependency_job_id":"da6db7fa-6669-406d-a4ad-cc9ba91cc34d","html_url":"https://github.com/MLopez-Ibanez/eaf","commit_stats":{"total_commits":418,"total_committers":5,"mean_commits":83.6,"dds":0.04066985645933019,"last_synced_commit":"bc98c6fb95f4209d579695d8dfa740d695186cd9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2Feaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2Feaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2Feaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2Feaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MLopez-Ibanez","download_url":"https://codeload.github.com/MLopez-Ibanez/eaf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243817064,"owners_count":20352491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eaf","eaf-differences","epsilon","hypervolume","inverted-generational-distance","multiobjective-optimization","r","summary-attainment-surfaces","visualization"],"created_at":"2024-10-10T18:29:57.645Z","updated_at":"2025-03-16T13:31:19.114Z","avatar_url":"https://github.com/MLopez-Ibanez.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"man/figures/ALG_1_dat-ALG_2_dat.png\" width=\"455\" height=\"242\" alt= \"EAF\n   differences between two bi-objective optimizers\" title= \"EAF differences\n   between two bi-objective optimizers\" style= \"border:0; align:right; float:right;\"/\u003e\n\u003cimg src=\"man/figures/eafdiff-color.png\" width=\"480\"\n   height=\"240\" alt=\"EAF differences between two variants of W-RoTS (color)\"\n   title=\"EAF differences between two variants of W-RoTS (color)\"\n   style=\"border:0; align:right; float:right; clear:right\"/\u003e\n   \n**eaf**: Empirical Attainment Function (EAF) Tools\n================================================================\n\n\u003c!-- badges: start --\u003e\n[![CRAN Status](https://www.r-pkg.org/badges/version-last-release/eaf)](https://cran.r-project.org/package=eaf) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/eaf)](https://CRAN.R-project.org/package=eaf) [![R build\nstatus](https://github.com/MLopez-Ibanez/eaf/workflows/R-CMD-check/badge.svg)](https://github.com/MLopez-Ibanez/eaf/actions)\n[![Codecov test coverage](https://codecov.io/gh/MLopez-Ibanez/eaf/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MLopez-Ibanez/eaf?branch=master)\n\u003c!-- badges: end --\u003e\n\n[ [**Homepage**](https://mlopez-ibanez.github.io/eaf/) ]  [ [**GitHub**](https://github.com/MLopez-Ibanez/eaf) ]\n\n**Maintainer:** [Manuel López-Ibáñez](https://lopez-ibanez.eu)\n\n**Contributors:**\n    [Manuel López-Ibáñez](https://lopez-ibanez.eu),\n    [Marco Chiarandini](http://www.imada.sdu.dk/~marco),\n    [Carlos M. Fonseca](https://eden.dei.uc.pt/~cmfonsec/),\n    [Luís Paquete](https://eden.dei.uc.pt/~paquete/),\n    Thomas Stützle,\n    and Mickaël Binois.\n    \n---------------------------------------\n\nIntroduction\n============\n\nThe empirical attainment function (EAF) describes the probabilistic\ndistribution of the outcomes obtained by a stochastic algorithm in the\nobjective space. This [R](https://www.R-project.org/) package implements plots\nof summary attainment surfaces and differences between the first-order\nEAFs. These plots may be used for exploring the performance of stochastic local\nsearch algorithms for biobjective optimization problems and help in identifying\ncertain algorithmic behaviors in a graphical way.\n\nThe corresponding [book chapter](#LopPaqStu09emaa) [1] explains the use of\nthese visualization tools and illustrates them with examples arising from\npractice.\n\nIn addition, the package provides functions for computing several quality metrics, such as hypervolume, IGD, IGD+, and epsilon.\n\n**Keywords**: empirical attainment function, summary attainment surfaces, EAF\ndifferences, multi-objective optimization, bi-objective optimization,\nperformance measures, performance assessment, graphical analysis,\nvisualization.\n\n**Relevant literature:**\n\n 1. \u003ca name=\"LopPaqStu09emaa\"/\u003eManuel López-Ibáñez, Luís Paquete, and Thomas Stützle. [Exploratory Analysis of Stochastic Local Search Algorithms in Biobjective Optimization](https://doi.org/10.1007/978-3-642-02538-9_9). In T. Bartz-Beielstein, M. Chiarandini, L. Paquete, and M. Preuss, editors, *Experimental Methods for the Analysis of Optimization Algorithms*, pages 209–222. Springer, Berlin, Germany, 2010.\u003cbr\u003e\n    (This chapter is also available in a slightly extended form as Technical Report TR/IRIDIA/2009-015).\u003cbr\u003e\n    [ [bibtex](https://lopez-ibanez.eu/LopezIbanez_bib.html#LopPaqStu09emaa) |\n    doi: [10.1007/978-3-642-02538-9_9](https://doi.org/10.1007/978-3-642-02538-9_9)\n    | [Presentation](https://lopez-ibanez.eu/doc/gecco2010moworkshop.pdf) ]\n\n\nDownload and installation\n-------------------------\n\nThe **eaf** package is implemented in R. Therefore,\na basic knowledge of R is recommended to make use of all features. \n\nThe first step before installing the **eaf** package is to [install R](https://cran.r-project.org/). Once R is installed in the system, there are two methods for installing the **eaf** package:\n\n 1. Install within R (automatic download, internet connection required). Invoke\n    R, then\n    \n    ```r\n        install.packages(\"eaf\")\n    ```\n    \n 2. [Download the **eaf** package from CRAN](https://cran.r-project.org/package=eaf) (you may also need to download and install\n    first the [package modeltools](https://cran.r-project.org/package=modeltools)), and invoke at the command-line:\n    \n    ```bash\n        R CMD INSTALL \u003cpackage\u003e\n    ```\n    where `\u003cpackage\u003e` is one of the three versions available: `.tar.gz` (Unix/BSD/GNU/Linux), `.tgz` (MacOS X), or `.zip` (Windows).\n\nSearch the [R documentation](https://cran.r-project.org/faqs.html) if you need more help to install an R package on your system.\n\nThe code for 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\ncode](https://cran.r-project.org/package=eaf), uncompress it, and look for the\ndirectory `src/eaf`. The C code can be used to implement your own visualizations\ninstead of the visualizations provided by the **eaf** package. Compiled executables for computing the EAF can be found under `system.file(package=\"eaf\", \"bin\")`. Other useful\nexecutable programs can be found there.\n\nThe `eaf` package also contains two Perl scripts that may allow you to generate\nstandard plots without any R knowledge. See `inst/scripts/eafplot/` and\n`inst/scripts/eafdiff/` in the package source code. The scripts use the **eaf**\npackage internally to generate the plots, and, hence, the **eaf** package must\nbe installed and working.\n\n\nIf you wish to be notified of bugfixes and new versions, please subscribe to the [low-volume emo-list](https://lists.dei.uc.pt/mailman/listinfo/emo-list), where announcements will be made.\n\n[ [Download **eaf** package from CRAN](https://cran.r-project.org/package=eaf) ]  [ [Documentation](https://mlopez-ibanez.github.io/eaf/) ]  [ [Development version (GitHub)](https://github.com/MLopez-Ibanez/eaf) ]\n\n\nGitHub (Development version)\n----------------------------\n\nIf you wish to try the development version, you can install it by executing the\nfollowing commands within the R console:\n\n```R\n    R\u003e install.packages(\"devtools\")\n    R\u003e devtools::install_github(\"MLopez-Ibanez/eaf\")\n```\n\nUsage\n-----\n\nOnce the **eaf** package is installed, the following R commands will give more information:\n```r\n    library(eaf)\n    ?eaf\n    ?eafplot\n    ?eafdiffplot\n    ?read.data.sets\n    example(eafplot)\n    example(eafdiffplot) # This one takes some time\n```\n\nApart from the main R package, the source code contains the following extras in\nthe directory `inst/` (after installation, these files can be found at the\ndirectory printed by the R command `system.file(package=\"eaf\")`):\n\n * `scripts/eafplot` : Perl script to plot summary attainment surfaces.\n * `scripts/eafdiff` : Perl script to plot the differences between the EAFs of two input sets.\n * `extdata/` : Examples of utilization of the above programs. These are discussed in the corresponding [book chapter](#LopPaqStu09emaa) [1].\n\nIn addition, the source code contains the following under `src/`:\n * `src/eaf` : This C program computes the empirical attainment function in 2\n   or 3 dimensions. It is NOT required by the other programs, but it is\n   provided as a useful command-line utility. This version is based on the\n   original code written by Carlos M. Fonseca available at\n   http://www.tik.ee.ethz.ch/pisa/. A more recent version is available at [Prof. Fonseca's website](https://eden.dei.uc.pt/~cmfonsec/software.html).\n * `src/mo-tools` : Several tools for working with multi-objective data.\n \nFor more information, consult the `README` files at each subdirectory.\n\n\nPython\n------\n\nThanks to [rpy2](https://rpy2.github.io/doc/latest/html/index.html), you can\nuse the `eaf` package from Python. A complete example would be:\n\n```python\nimport os\n## Uncomment this if you suffer from this bug in cffi 1.13.0\n## https://bitbucket.org/rpy2/rpy2/issues/591/runtimeerror-found-a-situation-in-which-we\n#os.environ['RPY2_CFFI_MODE'] = \"API\"\n\n# Tested with rpy2 2.9.2-1 and 3.2.6\nimport numpy as np\nfrom rpy2.robjects.packages import importr, isinstalled, PackageNotInstalledError\nfrom rpy2.robjects import r as R\nfrom rpy2.robjects import numpy2ri\nfrom rpy2.robjects.vectors import StrVector\nnumpy2ri.activate()\nfrom rpy2.interactive import process_revents\nprocess_revents.start()\n\ndef install_rpackages(packages):\n    if not isinstance(packages, list):\n        packages = [ packages ]\n    utils = importr('utils') # import R's utility package\n    # Selectively install what needs to be installed.\n    names_to_install = [x for x in packages if not isinstalled(x)]\n    if len(names_to_install) \u003e 0:\n        print(f\"Installing packages: {names_to_install}\")\n        utils.install_packages(StrVector(names_to_install), repos = \"https://cloud.r-project.org\", verbose=True)\n\ntry:\n    eaf = importr(\"eaf\")\nexcept PackageNotInstalledError as e:\n    install_rpackages(\"eaf\")\n    eaf = importr(\"eaf\") # Retry after install\n\npath = R('system.file(package=\"eaf\", \"extdata\")')[0] + \"/\"\nalg1 = eaf.read_data_sets_(path + \"ALG_1_dat.xz\")\nalg1 = np.asarray(alg1)\nalg2 = np.asarray(eaf.read_data_sets_(path + \"ALG_2_dat.xz\"))\n\neaf.eafplot(alg1[:, 0:2], sets=alg1[:,2])\n\ninput(\"Press ENTER to see next plot: \")\n\neaf.eafdiffplot(alg1, alg2, title_left=\"A\", title_right=\"B\")\n```\n\nLicense\n--------\n\nThis software is Copyright (C) 2011-2021 Carlos M. Fonseca, Luís Paquete, Thomas\nStützle, Manuel López-Ibáñez and Marco Chiarandini.\n\nThis program is free software (software libre); you can redistribute it and/or\nmodify it under the terms of the GNU General Public License as published by the\nFree Software Foundation; either version 2 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the [GNU General Public License](http://www.gnu.org/licenses/gpl.html) for more details.\n\n**IMPORTANT NOTE**: Please be aware that the fact that this program is released\nas Free Software does not excuse you from scientific propriety, which obligates\nyou to give appropriate credit! If you write a scientific paper describing\nresearch that made substantive use of this program, it is your obligation as a\nscientist to (a) mention the fashion in which this software was used in the\nMethods section; (b) mention the algorithm in the References section. The\nappropriate citation is:\n\n * Manuel López-Ibáñez, Luís Paquete, and Thomas Stützle. **Exploratory Analysis of Stochastic Local Search Algorithms in Biobjective Optimization.** In T. Bartz-Beielstein, M. Chiarandini, L. Paquete, and M. Preuss, editors, *Experimental Methods for the Analysis of Optimization Algorithms*, pages 209–222. Springer, Berlin, Germany, 2010.  doi: 10.1007/978-3-642-02538-9_9\n\nMoreover, as a personal note, I would appreciate it if you would email\n`manuel.lopez-ibanez@manchester.ac.uk` with citations of papers referencing\nthis work so I can mention them to my funding agent and tenure committee.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlopez-ibanez%2Feaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlopez-ibanez%2Feaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlopez-ibanez%2Feaf/lists"}