[pymvpa] SL on an artificial dataset

Matthias Ekman matthias.ekman at googlemail.com
Thu Mar 29 12:06:36 UTC 2012


Hi,

sometimes I still encounter some problems with the transition from mvpa 
to mvpa2. This time, I would like to run a Searchlight on an artificial 
dataset. Previously that could be done like this:

from sklearn.datasets import make_classification
X,y = make_classification(n_samples=55, n_features=630, n_classes=2)
ds = MaskedDataset(samples=X, labels=y, chunks=np.arange(y.size))
cv = CrossValidatedTransferError(
          TransferError(LinearCSVMC()),
          OddEvenSplitter())
sl = Searchlight(cv, radius=5)

In mvpa2 I could do the same

ds = Dataset(X)
ds.targets = y
ds.chunks = np.arange(55)

but the sphere_searchlight requires a 'space' parameter. Here I don't 
have real neighbor-space relations. It can be completely random or 
neighbors in the np.array. How would you define that for a synthetic 
dataset?

Thanks in advance,
  Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20120329/54c74374/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list