[pymvpa] RPy and ENET

Per B. Sederberg persed at princeton.edu
Sat Jan 9 19:55:07 UTC 2010


At Wed, 23 Dec 2009 12:34:40 -0000,
Tara Gilliam wrote:
> 
> > I'm happy to take care of the move to rpy2, but it'll have to wait
> > until right after the new year.
> 
> Hi Per and Yaroslav,
> 
> That would be great, thanks very much for looking into this!
> Happy holidays,
> 

Hi Tara and Yarik:

Just an update on my end.  I've spent a few hours trying to get the
rpy_classic to work and, at least on my system, it does not seem to be
a 1-for-1 compatibility and I get loads of errors (mostly having to do
with conversions from R objects that don't work the same).  I tried
working through them, but I've now decided to reimplement with rpy2,
which I'm working on now and I'll hopefully finish this weekend.

The good news is that we only really need to keep around glmnet, which
is the most-recent of all those algorithms and provides a superset.
More specifically, you can run LARS and Elastic Nets with glmnet AND
you can do it both as a regresssion and as a multi-class algorithm.

Thus, I propose that we keep LARS and ENET as is with the rpy
dependency (we can remove them eventually) and expand glmnet to have
both rpy and rpy2 implementations (adding in the rpy2 externals
check).

If no one objects, I'll go ahead and implement all this.  Let me know
if you have suggestions for other ways I should go about handling this
rpy business...

Best,
Per


> 
> 
> > On 12/21/09, Yaroslav Halchenko <debian at onerussian.com> wrote:
> >> Hi Tara,
> >>
> >> Unfortunately switch to (support of) Rpy2 is only in our plans and we
> >> haven't touched it at all yet.
> >>
> >> I will check it out later on today if we could just use
> >> rpy-compatibility layer in rpy2 for now... I will update you
> >>
> >> On Mon, 21 Dec 2009, Tara Gilliam wrote:
> >>
> >>> Hello,
> >>
> >>> When I try to import the ENET classifier, I get an dependency error
> >>> about rpy being unavailable (PyMVPA version 0.4.3).
> >>
> >>> I can 'import rpy2', but not 'import rpy' - is it definitely the
> >>> original RPy that is required, or will RPy2 also work? The system I
> >>> am on is university-administered with RPy2 installed, and rpy does
> >>> not work with our current version of R. So if possible I would
> >>> prefer not having to install a lot of (unsupported) dependencies for
> >>> just this classifier item.
> >>
> >>> Looking further, the segment of code seems to be this (clfs/enet.py,
> >>> lines
> >>> 18-22):
> >>
> >>> # do conditional to be able to build module reference
> >>> if externals.exists('rpy', raiseException=True) and \
> >>>    externals.exists('elasticnet', raiseException=True):
> >>>     import rpy
> >>>     rpy.r.library('elasticnet')
> >>
> >>
> >>> From the Rpy2 documentation, there seems to be a sort of Rpy-compatible
> >>> mode:
> >>> from http://rpy.sourceforge.net/rpy2/doc/html/rpy_classic.html,
> >>> allowing
> >>> e.g.
> >>
> >>> import rpy2.rpy_classic as rpy
> >>> rpy.r.library('splines')
> >>
> >>> Do you know of any (e.g. version-specific) issue that would prevent
> >>> a local patch to the import statement from working here? Are there
> >>> any plans to switch PyMVPA to RPy2?
> >>
> >>> Many thanks,
> >>> Tara
> >>
> >>
> >>> _______________________________________________
> >>> Pkg-ExpPsy-PyMVPA mailing list
> >>> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> >>> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
> >>
> >>
> >> --
> >>                                   .-.
> >> =------------------------------   /v\  ----------------------------=
> >> Keep in touch                    // \\     (yoh@|www.)onerussian.com
> >> Yaroslav Halchenko              /(   )\               ICQ#: 60653192
> >>                    Linux User    ^^-^^    [175555]
> >>
> >>
> >>
> >> _______________________________________________
> >> 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