-
Notifications
You must be signed in to change notification settings - Fork 134
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
enable pass_attr in simplestats searchlight when returning raw predictions #383
base: master
Are you sure you want to change the base?
Conversation
all_testing_sa = self._all_testing_sa | ||
new_sas = {} | ||
for attr in all_testing_sa[0].keys(): | ||
new_sas[attr] = np.concatenate([tsa[attr].value for tsa in all_testing_sa], 0) |
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.
hm, so this one goes beyond of original pass_attr intention to just copy attributes from the original dataset, not to "track" them down all the way like this one does. My concern is that it might be somewhat defeating the purpose of these adhoc searchlights to be fast -- in case of a dataset with heavy/lots of .sa's all the concatenation which would not get used (unless some pass_attr were specified) is somewhat wasteful :-/ At least condition it on having any 'self.pass_attr' defined and only then do this "copy everything" here and above... (otherwise -- only 'targets'). Actually ideally, at the top above (before looping) just call super's _pass_attr on an original ds, and mocked up result matching it to track which .sa would get copied, and then collect/concatenate only those to be passed along
If the partitions schemes doesn't output all samples in the same order for testing set, the passed attr either raise size mismatch or are incoherent.