lacava / few

a feature engineering wrapper for sklearn
https://lacava.github.io/few
GNU General Public License v3.0
50 stars 22 forks source link

Lexicase survival #23

Closed rgupta90 closed 6 years ago

rgupta90 commented 7 years ago

This has issues and doesn't run. Creating request for analysis in this separate branch.

Gives error 'bool' is not a type identifier in

cdef void _epsilon_lexicase "epsilon_lexicase"(Map[ArrayXXd] & F, int n, int d, int num_selections, Map[ArrayXi] & locs, bool lex_size, Map[ArrayXi] &sizes)

lacava commented 7 years ago

this might help

rgupta90 commented 6 years ago

done. removed message array declaration

On Tue, Aug 1, 2017 at 12:55 PM, William La Cava notifications@github.com wrote:

@lacava requested changes on this pull request.

looks good. just one line i would remove.

In few/lib/epsilon_lexicase.h https://github.com/lacava/few/pull/23#discussion_r130663852:

  • // individual locations
  • vector ind_locs_temp(sizes[random_index]);
  • ind_locs = ind_locs_temp;
  • //ind_locs.reserve(sizes[random_index]);
  • }
  • else{
  • // individual locations
  • vector ind_locs_temp(n);
  • ind_locs = ind_locs_temp;
  • //ind_locs.reserve(n);
  • }*/
  • vector ind_locs;
  • if(lex_size){ +vector ind_locs(n); +if(lex_size){ char message[200];

get rid of this

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lacava/few/pull/23#pullrequestreview-53564928, or mute the thread https://github.com/notifications/unsubscribe-auth/AWoXLZ5I-U9eugS109j2D4pDSlzQg4T9ks5sT1h8gaJpZM4N9wA4 .

-- Rishabh Gupta Graduate Student, Embedded Systems Program Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA-19104

rgupta90 commented 6 years ago

I guess you were referring to resizing in else statement by just declaring above, instead of defining size. I tried that and seems to work fine with accuracy always improving now with lex_size as compared to, without it. (ran both 3-4 times) So, seems to work good.

On Tue, Aug 1, 2017 at 1:38 PM, William La Cava notifications@github.com wrote:

@lacava commented on this pull request.

In few/lib/epsilon_lexicase.h https://github.com/lacava/few/pull/23#discussion_r130675827:

@@ -96,9 +96,8 @@ void epsilon_lexicase(const ExtMat & F, int n, int d, for (int i = 0; i<epsilon.size(); ++i) epsilon(i) = mad(F.col(i));

-vector ind_locs(n); -if(lex_size){

  • char message[200];
  • vector ind_locs(n);

ind_locs.resize(n); should work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lacava/few/pull/23#discussion_r130675827, or mute the thread https://github.com/notifications/unsubscribe-auth/AWoXLSvBchMjUSunj2j_m-8irOJ_156Eks5sT2KdgaJpZM4N9wA4 .

-- Rishabh Gupta Graduate Student, Embedded Systems Program Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA-19104

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 74.754% when pulling 2b6b9a4313997156a02e888796483523917d51e9 on lexicase_survival into bee67c433f40e151a2b0d74b2a6814fd5ccafded on master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 74.754% when pulling be1b7e95993ac51f8c550331f6437cd21e736a07 on lexicase_survival into bee67c433f40e151a2b0d74b2a6814fd5ccafded on master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.07%) to 75.089% when pulling 7df082a9c34e5cb89639d300b5011a4306fc72e8 on lexicase_survival into bee67c433f40e151a2b0d74b2a6814fd5ccafded on master.

lacava commented 6 years ago

i finally got this to compile on my system. there was a dangling build of the shared object in ~/anaconda3/lib/python3.5/site-packages/ that was giving an argument mismatch. it seems to work well now. I also added a test for the lex_size flag to test_selection.py.

rgupta90 commented 6 years ago

Sounds great!

On Wed, Aug 2, 2017 at 5:14 PM, William La Cava notifications@github.com wrote:

i finally got this to compile on my system. there was a dangling build of the shared object in ~/anaconda3/lib/python3.5/site-packages/ that was giving an argument mismatch. it seems to work well now. I also added a test for the lex_size flag to test_selection.py.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lacava/few/pull/23#issuecomment-319800644, or mute the thread https://github.com/notifications/unsubscribe-auth/AWoXLSmqqzwYrETl-4RkO1-kIQquFLdhks5sUObCgaJpZM4N9wA4 .

-- Rishabh Gupta Graduate Student, Embedded Systems Program Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA-19104