[R] R vs Python performance-wise

2008-12-06 Thread Jose Quesada

Hi,

Has anyone run any R vs Python (numpy) tests?
I'd love to see what the differences performance-wise are, specially  
handling large sparse matrices.
Since both rely on external C code, there might not be much of a  
difference.


If you know and use both languages, what are the main differences and what  
made you stick to one over another?


I also noticed that there are strong libraries for social networks on both.

python:
networkX: https://networkx.lanl.gov/wiki
pySNA: http://www.menslibera.com.tr/pysna/

R:
sna, network etc. see:
http://www.jstatsoft.org/v24

Has anyone run a bechmark of the two systems doing the same operation?

Which is the right environment for large social networks? Some packages  
have bindings for both languages, and of course, there's  a reliable way  
to bind the two languages together, Rpy:

http://rpy.sourceforge.net/

So this may not be a big deal which one to pick.

Thanks,
-Jose

--
Jose Quesada, PhD.
Max Planck Institute, Human Development, Berlin
http://www.andrew.cmu.edu/~jquesada

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R vs Python performance-wise

2008-12-06 Thread Martin Maechler
 JQ == Jose Quesada [EMAIL PROTECTED]
 on Sat, 06 Dec 2008 12:28:34 +0100 writes:

JQ Hi, Has anyone run any R vs Python (numpy) tests?  I'd
JQ love to see what the differences performance-wise are,
JQ specially handling large sparse matrices.  Since both
JQ rely on external C code, there might not be much of a
JQ difference.

(yes).
You mention sparse matrices here,
but not the 'Matrix' package below.
For sparse matrices, I'd strongly recommend using that.

I note that you mention 'sna', and that uses sparseM
which also deals with sparse matrices, but less comprehensively
and partly based on suboptimal (mostly because less modern)
algorithms.

JQ If you know and use both languages, what are the main
JQ differences and what made you stick to one over another?

JQ I also noticed that there are strong libraries for
JQ social networks on both.


JQ python: networkX: https://networkx.lanl.gov/wiki pySNA:
JQ http://www.menslibera.com.tr/pysna/

JQ R: sna, network etc. see: http://www.jstatsoft.org/v24

yes.  IIRC, some or even most of these use graph representations without
explicit sparse matrix interfaces.
That's quite natural since sparse matrices can only represent
one number per (directed) relation.
On the other hand, I have been a bit startled to see that
(AFAICS) the 'network' package does not easily create sparse but
rather dense adjacency matrices...

One interesting package, not mentioned above (since it's rather
dealing with traditional graphs) is the 'igraph'
one.  AFAIK, it uses very efficient algorithms in some parts.

JQ Has anyone run a bechmark of the two systems doing the
JQ same operation?

JQ Which is the right environment for large social
JQ networks? Some packages have bindings for both
JQ languages, and of course, there's a reliable way to bind
JQ the two languages together, Rpy:
JQ http://rpy.sourceforge.net/

JQ So this may not be a big deal which one to pick.

JQ Thanks, -Jose

JQ -- Jose Quesada, PhD.  Max Planck Institute, Human
JQ Development, Berlin http://www.andrew.cmu.edu/~jquesada

JQ __
JQ R-help@r-project.org mailing list
JQ https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
JQ read the posting guide
JQ http://www.R-project.org/posting-guide.html and provide
JQ commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.