mlopez-ibanez / eaf Goto Github PK
View Code? Open in Web Editor NEWR package for plotting the Empirical Attainment Function
Home Page: http://lopez-ibanez.eu/eaftools
R package for plotting the Empirical Attainment Function
Home Page: http://lopez-ibanez.eu/eaftools
Hello,
First of all, congratulations for the eaftools library. It is one of the best tools I've seen to visualize the results of multi-objective optimization. I have three quick questions related to its use (I've searched through the documentation, the website, and the source code and did not find it):
1- Is there a way to extract to which percentile each point on the original dataset would belong (the attainment surfaces), after running the eafplot function for maximizing one criteria and minimizing the other one? Example: I've generated a plot with percentiles = c(0, 20, 40, 60, 80, 100) and I can plot the original points in the dataset on the final plot using extra.points. However, it would be very valuable to know to which "percentile class" each point belonged, so I could calculate the % of points in each "percentile class"
2- Is there an example for running the eaf for 3 dimensions?
3- Are there any visualizations planned for the library for optimization in 3 dimensions?
Thanks a lot,
Roberto
Use the method suggested here: https://dl.acm.org/doi/10.1162/evco_a_00226
to define a default reference point.
Hi,
I wanted to install this package using devtool::install_github("MLopez-Ibanez/eaf")
line, but I got the below error:
Downloading GitHub repo MLopez-Ibanez/eaf@master
from URL https://api.github.com/repos/MLopez-Ibanez/eaf/zipball/master
Installing eaf
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/Amin/AppData/Local/Temp/Rtmp06uYpP/devtools119026131c0f/MLopez-Ibanez-eaf-ea9b50f" \
--library="C:/Users/Amin/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'eaf' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -DVARIANT=4 -DR_PACKAGE -DDEBUG=1 -O3 -Wall -std=gnu99 -mtune=generic -c Reaf.c -o Reaf.o
In file included from Rcommon.h:6:0,
from Reaf.c:1:
common.h:1:1: error: expected identifier or '(' before '.' token
../inst/scripts/mo-tools/common.h
^
In file included from Reaf.c:2:0:
eaf.h:1:1: error: expected identifier or '(' before '.' token
../inst/scripts/eaf/eaf.h
^
Reaf.c: In function 'compute_eaf_C':
Reaf.c:67:5: error: unknown type name 'eaf_t'
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, percentile, nlevels);
^
Reaf.c:67:5: warning: implicit declaration of function 'compute_eaf_helper' [-Wimplicit-function-declaration]
Reaf.c:67:19: warning: initialization makes pointer from integer without a cast
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, percentile, nlevels);
^
Reaf.c:69:5: warning: implicit declaration of function 'eaf_totalpoints' [-Wimplicit-function-declaration]
int totalpoints = eaf_totalpoints (eaf, nlevels);
^
Reaf.c:78:29: error: request for member 'size' in something not a structure or union
int npoints = eaf[k]->size;
^
Reaf.c:80:9: warning: implicit declaration of function 'DEBUG2' [-Wimplicit-function-declaration]
DEBUG2(
^
Reaf.c:81:13: error: expected expression before 'int'
int totalsize = npoints * nobj;
^
Reaf.c:89:53: error: request for member 'data' in something not a structure or union
rmat[pos + j * totalpoints] = eaf[k]->data[j + i * nobj];
^
Reaf.c:94:9: warning: implicit declaration of function 'eaf_delete' [-Wimplicit-function-declaration]
eaf_delete (eaf[k]);
^
Reaf.c: In function 'compute_eafdiff_C':
Reaf.c:114:5: error: unknown type name 'eaf_t'
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, NULL, nruns);
^
Reaf.c:114:19: warning: initialization makes pointer from integer without a cast
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, NULL, nruns);
^
Reaf.c:126:29: error: request for member 'size' in something not a structure or union
int npoints = eaf[k]->size;
^
Reaf.c:130:13: error: expected expression before 'int'
int totalsize = npoints * nobj;
^
Reaf.c:137:53: error: request for member 'data' in something not a structure or union
rmat[pos + j * totalpoints] = eaf[k]->data[j + i * nobj];
^
Reaf.c:145:29: error: request for member 'size' in something not a structure or union
int npoints = eaf[k]->size;
^
Reaf.c:149:13: warning: implicit declaration of function 'attained_left_right' [-Wimplicit-function-declaration]
attained_left_right (eaf[k]->attained + i * eaf[k]->nruns,
^
Reaf.c:149:40: error: request for member 'attained' in something not a structure or union
attained_left_right (eaf[k]->attained + i * eaf[k]->nruns,
^
Reaf.c:149:63: error: request for member 'nruns' in something not a structure or union
attained_left_right (eaf[k]->attained + i * eaf[k]->nruns,
^
Reaf.c: In function 'polygon_len':
Reaf.c:165:20: error: 'objective_MIN' undeclared (first use in this function)
while (*src != objective_MIN)
^
Reaf.c:165:20: note: each undeclared identifier is reported only once for each function it appears in
Reaf.c: In function 'polygon_copy':
Reaf.c:174:20: error: 'objective_MIN' undeclared (first use in this function)
while (*src != objective_MIN) {
^
Reaf.c: In function 'compute_eafdiff_area_C':
Reaf.c:199:5: error: unknown type name 'eaf_t'
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, NULL, nruns);
^
Reaf.c:199:19: warning: initialization makes pointer from integer without a cast
eaf_t **eaf = compute_eaf_helper(DATA, nobj, CUMSIZES, nruns, NULL, nruns);
^
Reaf.c:201:5: error: unknown type name 'eaf_polygon_t'
eaf_polygon_t *p = eaf_compute_area (eaf, nruns);
^
Reaf.c:201:5: warning: implicit declaration of function 'eaf_compute_area' [-Wimplicit-function-declaration]
Reaf.c:201:24: warning: initialization makes pointer from integer without a cast
eaf_polygon_t *p = eaf_compute_area (eaf, nruns);
^
Reaf.c:209:5: warning: implicit declaration of function 'vector_int_size' [-Wimplicit-function-declaration]
int ncol = vector_int_size(&p->col);
^
Reaf.c:209:34: error: request for member 'col' in something not a structure or union
int ncol = vector_int_size(&p->col);
^
Reaf.c:211:5: error: invalid use of void expression
DEBUG2(Rprintf ("ncol: %d\n", ncol));
^
Reaf.c:218:5: warning: implicit declaration of function 'vector_objective_begin' [-Wimplicit-function-declaration]
double * p_xy = vector_objective_begin(&p->xy);
^
Reaf.c:218:46: error: request for member 'xy' in something not a structure or union
double * p_xy = vector_objective_begin(&p->xy);
^
Reaf.c:220:9: warning: implicit declaration of function 'vector_int_at' [-Wimplicit-function-declaration]
double color = vector_int_at(&p->col, k);
^
Reaf.c:220:40: error: request for member 'col' in something not a structure or union
double color = vector_int_at(&p->col, k);
^
Reaf.c:224:9: error: invalid use of void expression
DEBUG2(Rprintf ("color: %d, len = %d\n", color, len));
^
Reaf.c:232:9: warning: implicit declaration of function 'vector_int_set' [-Wimplicit-function-declaration]
vector_int_set(&p->col, k, color);
^
Reaf.c:232:26: error: request for member 'col' in something not a structure or union
vector_int_set(&p->col, k, color);
^
Reaf.c:236:21: error: invalid use of void expression
left_len, right_len, left_ncol, right_ncol));
^
Reaf.c:248:37: error: request for member 'xy' in something not a structure or union
p_xy = vector_objective_begin(&p->xy);
^
Reaf.c:253:37: error: request for member 'col' in something not a structure or union
int color = vector_int_at(&p->col, k);
^
Reaf.c:267:5: warning: implicit declaration of function 'vector_int_dtor' [-Wimplicit-function-declaration]
vector_int_dtor (&p->col);
^
Reaf.c:267:24: error: request for member 'col' in something not a structure or union
vector_int_dtor (&p->col);
^
Reaf.c:268:5: warning: implicit declaration of function 'vector_objective_dtor' [-Wimplicit-function-declaration]
vector_objective_dtor (&p->xy);
^
Reaf.c:268:30: error: request for member 'xy' in something not a structure or union
vector_objective_dtor (&p->xy);
^
Reaf.c: In function 'read_data_sets':
Reaf.c:294:5: error: unknown type name 'objective_t'
objective_t *data = NULL;
^
Reaf.c:300:5: warning: implicit declaration of function 'read_objective_t_data' [-Wimplicit-function-declaration]
read_objective_t_data (filename, &data, &nobj, &cumsizes, &nruns);
^
Reaf.c:307:30: warning: passing argument 2 of 'double_transpose' from incompatible pointer type
double_transpose (rdata, data, ntotal, nobj);
^
In file included from Reaf.c:1:0:
Rcommon.h:104:1: note: expected 'const double *' but argument is of type 'int *'
double_transpose(double *dst, const double *src,
^
Reaf.c:309:15: warning: unused variable 'i' [-Wunused-variable]
int k, j, i;
^
make: *** [Reaf.o] Error 1
ERROR: compilation failed for package 'eaf'
* removing 'C:/Users/Amin/Documents/R/win-library/3.5/eaf'
* restoring previous 'C:/Users/Amin/Documents/R/win-library/3.5/eaf'
In R CMD INSTALL
Installation failed: Command failed (1)
Do you have any idea what is this error for?
Thanks.
The example in the README of running eaf
with Python requires numpy<=1.16.4
(and no later, until rpy2
v3.0.x is released and may fix it). Note that this is referenced in another issue for rpy2
(conda-forge/rpy2-feedstock#28).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.