Re: [pymvpa] Biased estimates by leave-one-out cross-validations in PyMVPA 2

2012-04-22 Thread Yaroslav Halchenko
yeah -- we need to improve our documentation of Balancer... meanwhile
try something like

cv=CrossValidation(clf,
   ChainNode([NFoldPartitioner(),
  Balancer(attr='targets',
   count=1, # for real data  1
   limit='partitions',
   apply_selection=True
   )],
 space='partitions'))

On Sat, 21 Apr 2012, Ping-Hui Chiu wrote:

Thanks Yaroslav! I tried the Balancer generator but it didn't help in the
following case of binary classification on random samples:

from mvpa2.suite import *
clf=LinearCSVMC();

 cv=CrossValidation(clf,ChainNode([NFoldPartitioner(),Balancer()],space='partitio
ns'))
acc=[]
for i in range(200):
 print i
 ds=Dataset(np.random.rand(200))
 [1]ds.sa['targets']=np.remainder(range(200),2)
 [2]ds.sa['chunks']=range(200)
 results=cv(ds)
 acc.append(1-np.mean(results))

print np.mean(acc),np.std(acc)
0.4106 0.212417960634

-- 
=--=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Re: [pymvpa] PyMVPA for Python 3 -- second report

2012-04-22 Thread Yaroslav Halchenko
oh boy... ;-)
was it painful?

Thanks!

On Sun, 22 Apr 2012, Tiziano Zito wrote:

  Also since github PR accepted as merges, it would be best first to just
  cherry pick mine on top of yours to avoid merges and then do rebase -i 

 done :)

-- 
=--=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic

___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa


Re: [pymvpa] PyMVPA for Python 3 -- second report

2012-04-22 Thread Tiziano Zito
 was it painful?
not really, just a bit of vi gymnastics ;)

ciao,
tiziano

___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa