Skip to content
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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

bpinsard
Copy link

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.

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)
Copy link
Member

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

@yarikoptic yarikoptic modified the milestone: 2.4.2 Nov 19, 2015
@yarikoptic yarikoptic modified the milestones: 2.4.2, Release 2.6.1 Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants