<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 11:46 AM, Nick Oosterhof <span dir="ltr"><<a href="mailto:n.n.oosterhof@googlemail.com" target="_blank">n.n.oosterhof@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 25 Feb 2015, at 16:55, gal star <<a href="mailto:gal.star3051@gmail.com">gal.star3051@gmail.com</a>> wrote:<br>
<br>
> > < Python Code for selecting only '0' chunk for train and '1' for test><br>
><br>
> Can you provide this code please?<br>
><br>
> int_train = numpy.array([l in [0] for l in fds.sa.chunks])<br>
> int_test = numpy.array([l in [1] for l in fds.sa.chunks])<br>
><br>
> train = fds[int_train]<br>
> test = fds[int_test]<br>
><br>
><br>
> > clf.train(train)<br>
> > print clf.predict(test.samples)<br>
><br>
> How exactly do you determine the standard deviation among classification accuracies?<br>
><br>
> I am running this script code k times (each time, different part of the data input with '1' chunk).<br>
<br>
</span>If I understand correctly, you could have just one script and have a for-loop over the folds, something like:<br>
<br>
for fold in xrange(nfolds):<br>
  train=fds[fold!=fds.sa.chunks]<br>
  train=fds[fold==fds.sa.chunks]<br>
<br>
assuming the folds are in the range 0..(nfolds-1).<br>
<br></blockquote><div>The reason I didn't do that initialy was balancing. </div><div>I need to equalize the amount of data point from each class. I don't</div><div>want to remove data points but rather duplicate random chosen data points.</div><div><br></div><div>Therefore, for each fold, i'm loading different sample attribute so i could use </div><div>a balanced train set according to duplication of some data points from the train set. </div><div>I'm familiar with Balancer, though it balance every chunk by removal (and also i don't want to balance the test set, only the train set).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> In each time i get an accuracy result. then i'm averaging those k results and calculate standard divination.<br>
<br>
With the above idea, do you get identical results?<br>
<span class="">><br></span></blockquote><div><br></div><div>If there's way i could perform balancing in every iteration</div><div>with duplication instead of removal using the PyMVPA API?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> Also, the topic of your email is about errorfx, but I didn’t see you using that function anywhere. Could you clarify?<br>
><br>
> Yes, i'm performing manual cross validation, but i've seen that<br>
> if i use the CrossValidation class there is an errrofx parameter.<br>
</span>> I'm trying to understand what is it contributes and how can i use it manually.<br>
<br>
errorfx is used to compute the accuracy, by computing, for each fold, how many samples have the same predicted label as the target label.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<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>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
</div></div></blockquote></div><br></div></div>