Solved

Benefits of Python versus R

Posted on 2014-11-13
2
255 Views
Last Modified: 2014-11-19
I’m refactoring someone else’s code that’s been written half in Python and half in R. The core purpose of the code is discriminate analysis. Of course, I think it would be clearly beneficial for performance if only a single language was used, and I’m trying to make an argument one way or another.

The two common areas of debate between R and Python are speed and differences in algorithms (and thus mathematical accuracy). In addition, it’s my understanding that R was chosen from the belief that the validity of the analysis would be more defensible (scientifically) if it were done in R.

So, I’d love some input on two ideas:

1.      In a (specifically) discriminate analysis environment, would R be more defensible (and why)?
2.      In a (specifically) discriminate analysis environment, in what analytical/mathematical ways is R better than Python?

I really appreciate anyone taking the time to respond to this.  

Best!
0
Comment
Question by:Mike R.
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 27

Accepted Solution

by:
d-glitch earned 500 total points
ID: 40441737
Presumably you mean discriminant not discriminate.
     http://www.jmp.com/support/help/Discriminant_Analysis_2.shtml#65479

This topic is covered extensively on line.  This is just one of the threads from Googling "Python vs R"
     http://www.quora.com/Which-is-better-for-data-analysis-R-or-Python

Python is a general purpose interpreted language.
R is also an interpreted language which is targeted at statistical analysis (your application).

I wouldn't worry much about numerical accuracy.  The respective communities are sure to be vigilant.
Speed is apt to be a toss-up as well.  Check the published bench marks for each language.

Community acceptance might dictate a choice of R over Python.  Check with the editors of Journals in your field or scan some recent issues.  And even that decision could be wrong by next year.

One last (frustratingly unhelpful) note:  The hybrid combination of R and Python may be the right choice.
     http://www.r-bloggers.com/python-compliments-rs-shortcomings/
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 40448208
Several criteria can be used to justify the choice of a particular language:

Exigency:  If the project is incomplete, and needs to be completed soon, use the language you know best.

Authority:  If external authorities require a particular language, use it even if there is a learning curve.

Expediency:  Use a combination of languages if that gets the job done fastest.
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
phython 2 63
Determine best-fit curve and its function [y=f(x)] from multiple (x, y) data points in Excel 6 78
add if statement powershell 8 56
Edit my bash script 16 46
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question