[pymvpa] RPy and ENET

Per B. Sederberg persed at princeton.edu
Mon Jan 11 14:39:31 UTC 2010


On Mon, Jan 11, 2010 at 9:31 AM, Michael Hanke <michael.hanke at gmail.com> wrote:
> On Mon, Jan 11, 2010 at 08:27:15AM -0500, Per B. Sederberg wrote:
>> exists('rpy2', raiseException=True); import rpy2.robjects;
>> rpy2.robjects.r.library('glmnet')
>>
>> You just ran the last two and it works.  What happens when you run the
>> first?  Perhaps it is something in the exists method...  I assume if
>> you can run the last two, then you can also run:
>>
>> import rpy2 as __
>>
>> which is the check for rpy2...
>>
>> What happens if you change the glmnet check to be just:
>>
>> import rpy2.robjects; rpy2.robjects.r.library('glmnet')
>
> The problem was RPy1 -- they didn't play nicely together. Once I removed
> RPy1, things were fine.
>

Strange.  I think it's something about 64-bit, too.  Tests for rpy and
rpy2 dependent classifiers all run without a problem on my laptop,
which is 32-bit and has both rpy and rpy2, but I just tested on my
64-bit desktop and got the same error you did.

Given that all of the code to test for rpy and rpy2 run from ipython,
I'm really thinking this is an error in the exists method.  There's a
part in there that I don't understand about rpy dependency checking,
so I couldn't do the same for rpy2.  Did you write that?

> That raises the question, what we should do with the RPy1 dependent
> code? Per, could you port ithe rest to RPy2 as well (possibly removing ENET, if
> it is fully replaced by GLMNET now)?
>

GLMNET actually replaces both ENET and LARS and does it faster than
both, so I think we should just end up removing both the others.  I'll
try and write an example to go into the docs that does all three with
GLMNET.

If someone can voice a reason to keep LARS and ENET, then I'm happy to
port them, too.

>
> Sidenote: If refactored the glmnet tests a bit and included them into
> the main battery. That revealed a few problems that I am addressing
> right now -- will push what I have now nevertheless and push the fixes
> later on.

Sounds good.  Let me know when you've pushed the other changes and
I'll give it a whirl.

Best,
P

>
> Thanks,
>
> Michael
>
> --
> GPG key:  1024D/3144BE0F Michael Hanke
> http://mih.voxindeserto.de
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
>



More information about the Pkg-ExpPsy-PyMVPA mailing list