-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lexicase survival #23
Conversation
this might help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. just one line i would remove.
few/lib/epsilon_lexicase.h
Outdated
vector<int> ind_locs; | ||
if(lex_size){ | ||
vector<int> ind_locs(n); | ||
if(lex_size){ | ||
char message[200]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get rid of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. removed message array declaration
done. removed message array declaration
…On Tue, Aug 1, 2017 at 12:55 PM, William La Cava ***@***.***> wrote:
***@***.**** requested changes on this pull request.
looks good. just one line i would remove.
------------------------------
In few/lib/epsilon_lexicase.h
<#23 (comment)>:
> - // individual locations
- vector<int> ind_locs_temp(sizes[random_index]);
- ind_locs = ind_locs_temp;
- //ind_locs.reserve(sizes[random_index]);
- }
- else{
- // individual locations
- vector<int> ind_locs_temp(n);
- ind_locs = ind_locs_temp;
- //ind_locs.reserve(n);
- }*/
-
- vector<int> ind_locs;
- if(lex_size){
+vector<int> 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
<#23 (review)>, 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
|
few/lib/epsilon_lexicase.h
Outdated
vector<int> ind_locs(n); | ||
if(lex_size){ | ||
char message[200]; | ||
vector<int> ind_locs(n); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ind_locs should start out empty if you are pushing back values into it. otherwise it will be 2n after lex_size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I also thought so, but it was showing an error with just declaring it above vector ind_locs and then reserving size inside else statement(when lex_size is not there). And if I just declare and define inside else, it may not be accessible outside.
In case this is 2n after lex_size and is an issue, will have to see an alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ind_locs.resize(n); should work.
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 ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In few/lib/epsilon_lexicase.h
<#23 (comment)>:
> @@ -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<int> ind_locs(n);
-if(lex_size){
- char message[200];
+ vector<int> 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
<#23 (comment)>, 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
|
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. |
Sounds great!
…On Wed, Aug 2, 2017 at 5:14 PM, William La Cava ***@***.***> 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
<#23 (comment)>, 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
|
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)