[pymvpa] Error when using pearsonr with ridgeregression

Thomas Nickson thomas.nickson at gmail.com
Thu Jan 15 15:07:28 UTC 2015


Ah okay, thanks for that!

I thought ridge regression would give a continuous value right? I thought
it might be good to look at this because the patients are high risk where
some go on to develop a disorder at some time point which I thought might
be interesting as a continuum. Although I'm happy to be told it's probably
nonsense.



On Thu, Jan 15, 2015 at 2:23 PM, Yaroslav Halchenko <debian at onerussian.com>
wrote:

> Hi Thomas,
>
>
> On Thu, 15 Jan 2015, Thomas Nickson wrote:
>
> >
> /home/orkney_01/tnickson/Programming/pyVirtualEnv/lib/python2.6/site-packages/mvpa2/base/dataset.pyc
> in __init__(self, samples, sa, fa, a)
> >      213         if not hasattr(samples, 'dtype'):
> >      214             raise ValueError(
> >  --> 215                 "AttrDataset only supports dtypes as samples
> that have a "
> >      216                 "`dtype` attribute that behaves similar to the
> one of an "
> >      217                 "array-like.")
>
> >  ValueError: AttrDataset only supports dtypes as samples that have a
> `dtype` attribute that behaves similar to the one of an array-like.
>
> good way to troubleshoot such troubles when working in ipython, is to
> enable pdb (just type %pdb) so it would fall into debugger right at that
> point.  Then you could inspect
>
> (Pdb) print samples
> (0.26726124191242479, 0.010880186798833041)
>
> to get a hint that pearsonr returns a tuple of both correlation and p
> value.
> It still smells like a bug in PyMVPA that we don't wrap it up properly but
> as
> an overcome you would just need to choose which one to use, e.g.
>
> errorfx=lambda x,y: pearsonr(x,y)[0],
>
> But then let's get back altogether to your analysis -- you are using a
> classifier, so dealing with classes and then using correlation coefficient
> as a
> measure (for ordered data) -- doesn't sound quite right unless there is
> some
> agenda behind your dataset's targets ;)
>
>
> --
> Yaroslav O. Halchenko, Ph.D.
> http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
> Research Scientist,            Psychological and Brain Sciences Dept.
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20150115/54ef1f4f/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list