[pymvpa] Sensitivity map with RFE?

marco tettamanti mrctttmnt at gmail.com
Thu Jul 18 14:49:48 UTC 2013


Sorry Yaroslav,
but that surpasses my coding skills :-(

> Yaroslav Halchenko debian at onerussian.com
> Thu Jul 18 13:29:36 UTC 2013
 >
>         senses = []
>         for i, pset in enumerate(NFoldPartitioner().generate(dataset)):
>             # split partitioned dataset
>             split = [d for d in Splitter('partitions').generate(pset)]
>
>             senses.append(senssvm(split[0]))

Do you mean, something like:

----------------------------------------------------------
clfsvm = SplitClassifier(LinearCSVMC(), NFoldPartitioner())

rfesvm = RFE(clfsvm.get_sensitivity_analyzer(postproc=maxofabs_sample()), 
ConfusionBasedError(clfsvm, confusion_state='stats'), Repeater(2), 
fselector=FractionTailSelector(0.30, mode='select', tail='upper'), 
stopping_criterion=NBackHistoryStopCrit(BestDetector(), 10), 
train_pmeasure=False, update_sensitivity=True)

fclfsvm = FeatureSelectionClassifier(clfsvm, rfesvm)

sensanasvm = fclfsvm.get_sensitivity_analyzer(postproc=maxofabs_sample())

cv_sensana_svm = RepeatedMeasure(sensanasvm, NFoldPartitioner())

senses = []
for i, pset in enumerate(NFoldPartitioner().generate(fds)):
# split partitioned dataset
split = [d for d in Splitter('partitions').generate(pset)]
senses.append(cv_sensana_svm(split[0]))
  ----------------------------------------------------------

This seems to run, senses incorporates 6 splits, but then I do not know how to 
proceed further to get the sensitivity map, with something like:


print senses.samples    # print senses[0].samples ?
ov = MapOverlap()
stabil_overlap_fraction_svm = ov(senses.samples > 0)
print stabil_overlap_fraction_svm
niftiresults = map2nifti(fds, senses)


Thank you again!
Marco


-- 
Marco Tettamanti, Ph.D.
Nuclear Medicine Department & Division of Neuroscience
San Raffaele Scientific Institute
Via Olgettina 58
I-20132 Milano, Italy
Phone ++39-02-26434888
Fax ++39-02-26434892
Email: tettamanti.marco at hsr.it
Skype: mtettamanti



More information about the Pkg-ExpPsy-PyMVPA mailing list