<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thank you very much!<div>It works like a charm.</div><div><br></div><div>Best regards,</div><div>Wouter De Baene</div><div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>On 20 Mar 2014, at 13:18, Michael Hanke <<a href="mailto:michael.hanke@gmail.com">michael.hanke@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hey,<div><br></div><div>On Wed, Mar 19, 2014 at 10:44 PM, Wouter De Baene <span dir="ltr"><<a href="mailto:Wouter.DeBaene@ugent.be" target="_blank">Wouter.DeBaene@ugent.be</a>></span> wrote:<br></div><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
I’m running my first pymvpa-analysis after attending a very nice pymvpa workshop in Delmenhorst.<br></blockquote><div><br></div><div>Glad you liked it!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Although there are a few related questions in the archive, I don’t seem to get this working.<br>
I’m setting up a searchlight analysis with Nfold cross-validation. I'm trying to look at the confusion matrix for each cross-validation for each searchlight. This information seems to be lost when using searchlights.<br>
As I understood there were some plans to aggregate the output per searchlight into the output of the total results. Is there any news about this? OR could I get to this information in another way for now?<br></blockquote>
<div><br></div><div>The easiest way to aggregate this kind of non-scalar information within a searchlight is to</div><div>get the confusion matrix to come out of the CrossValidation as a vector (flattened matrix).</div><div>
For the first part of a possible solution we have "Confusion", a node that turns raw targets</div><div>predictions into a confusion table. Here is a sketch: no error computing in the classifier, return</div><div>
raw predictions, use Confusion as a post-processing node to yield matrices.</div><div><br></div><div><div> CrossValidation(some_classifier,</div><div> some_partitioner,</div><div> errorfx=None,</div>
<div> postproc=Confusion())</div></div><div><br></div><div>Now the last bit is to flatten the confusion matrix into a vector. You could write a simple Node</div><div>implementation that does that. Here is some pseudo code:</div>
<div><br></div><div>class MyFlatMatrix(Node):</div><div> def _call(ds):</div><div> return Dataset(ds.samples.ravel())</div><div><br></div><div>and now use this class as a post-processing node for Confusion itself.</div>
<div><br></div><div><div> CrossValidation(some_classifier,</div><div> some_partitioner,</div><div> errorfx=None,</div><div> postproc=Confusion(postproc=MyFlatMatrix()))</div>
</div><div><br></div><div>stick this into a searchlight and it should harvest what you want. This is all written as a sketch and wasn't tested...</div><div><br></div><div>Instead of a custom Node class you could also use a ChainMapper comprised of a FlattenMapper and a TransposeMapper</div>
<div>to achieve the same thing....</div><div><br></div><div>Good luck!</div><div><br></div><div>Michael</div><div><br></div></div><div><br></div>-- <br><div dir="ltr">
<div>Michael Hanke</div><div><a href="http://mih.voxindeserto.de/" target="_blank">http://mih.voxindeserto.de</a></div><div><br></div></div>
</div></div>
_______________________________________________<br>Pkg-ExpPsy-PyMVPA mailing list<br><a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</blockquote></div><br></div></body></html>