[pymvpa] Searchlights and Permutation testing
Yaroslav Halchenko
debian at onerussian.com
Wed Jun 17 18:26:43 UTC 2015
On Wed, 17 Jun 2015, Bill Broderick wrote:
> > > res=[]
> > > gnb=GNB()
> > > nf=NFoldPartitioner()
> > > permutator=AttributePermutator('targets',number_of_permutations)
> > > sl_gnb=sphere_gnbsearchlight(gnb,nf,reuse_neighbors=True,radius=3)
> > > for i in permutator.generate(ds):
> > > res.append(sl_gnb(ds))
> > I think this should be res.append(sl_gnb(i))?
> Yes, my bad. That was a typo. It's res.append(sl_gnb(i))
sorry... coming too late to the party -- busy at OHBM... quick question -- why
don't you just use null_dist ?
I think that you shouldn't bother much with "keep testing order intact" but
instead, if your experiment/design requires maintaining temporal dependencies,
consider recently introduced to AttributePermutator uattrs or chunks
strategy
strategy : 'simple', 'uattrs', 'chunks'
'simple' strategy is the straightforward permutation of attributes (given
the limit). In some sense it assumes independence of those samples.
'uattrs' strategy looks at unique values of attr (or their unique
combinations in case of `attr` being a list), and "permutes" those
unique combinations values thus breaking their assignment to the samples
but preserving any dependencies between samples within the same unique
combination. The 'chunks' strategy swaps attribute values of entire chunks.
Naturally, this will only work if there is the same number of samples in
all chunks.
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list