Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Possible Duplicate:
Python as a statistics workbench

I am just starting out with data analysis and machine learning. From the books that I am reading/have read Python and R seem to be the best options for me.

I want to know (in a general way) the pro's and con's of each, or if I should perhaps use both.

Up until now I have been learning C# but have taught myself Python to a competent level. What interests me is programming and finding solutions. I want to work on new thing where possible.

Any help would be greatly appreciated.

share|improve this question

marked as duplicate by Andy W, gung, Peter Ellis, Peter Flom, steffen Jan 4 '13 at 9:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7  
Also see Python as a statistics workbench for some discussion of R and Python for data analysis. –  jthetzel Jan 3 '13 at 19:59
    
@jthetzel thanks for the link. –  The_Cthulhu_Kid Jan 3 '13 at 20:01
2  
This is very akin to endless debate. You may want to refine your question, e.g. by looking at Does Julia have any hope of sticking in the statistical community? –  chl Jan 3 '13 at 21:12
    
@chl I have made my question a little more specific, is it better now? –  The_Cthulhu_Kid Jan 3 '13 at 21:17
1  
Depends on the problem and comfort level of each. I do go back and forth, but spend more time in R (almost stay in R, unless I can't find an existing library for the application or have extremely large datasets). –  pat Jan 3 '13 at 21:25

1 Answer 1

up vote 10 down vote accepted

A good workman has several tools in his toolbox!

That said, do you see a distinction between C# and Python that adds to your toolbox?

R gives you access to thousands of statistical routines and techniques, plus great graphics. And it's a standard in the statistical world. (To be honest, I've noticed more Matlab in the Machine Learning community, but Matlab's an ugly language and expensive, so I'd feel guilty if I caused anyone to use it.) R is the best tool for actually analyzing data, except perhaps in the case of enormous data sets.

R's weakness, compared to C#, etc, would be its speed, its capacity to handle enormous data sets, and its development environment. So if you want to program things from scratch, use your favorite tool (C#, etc).

If you're mainly in data analysis mode, you might use Python to obtain and preprocess data, then feed it into R and carry on from there: explore, analyze, graph, etc. If you want to say, "I programmed my own Support Vector Machine implementation with the addition of Super Special Sprockets Mapping" use your favorite programming tool (C#, etc), then sanity check and display your answers with R.

I seriously doubt that you'll find Python libraries that implement all of the techniques that you'll find in R packages. But if you want to write code from scratch that really hasn't been done by others, a good programming language with a killer IDE is the way to go. (On the other hand, if you want to go to a Machine Learning website and download some code, those poor confused folks may well have Matlab code, which is nauseating, primitive, and write-only, in my opinion.)

share|improve this answer
1  
My answer would be pretty similar to Wayne's. I always use Python to parse through data. And I use R for statistical analyses, graphs, inference, etc. This has served me well. Just make sure you learn some shell scripting so it is easier to link the two. Technically you can do statistical analysis, graphing, etc. in Python, too, but the community support isn't nearly as strong in those areas as it is in R. –  Steve P Jan 4 '13 at 5:16
    
C# is what I have been learning in my course. Python, I feel, is more intuitive and more fun. I still have a lot to learn on all fronts but in my course it is mainly about app development and so I have had to teach myself the other things. Thanks for the advice! –  The_Cthulhu_Kid Jan 4 '13 at 7:52
    
I'd again reiterate that the development environment is very important for programming. I'm old-school and learned without fancy IDEs, but if I were learning now, I'd want something more. I like Python, and it also runs on all platforms (I use a Mac, for example). –  Wayne Jan 4 '13 at 13:41
    
@Wayne I'm using Eclipse with PyDev, VS 2012 and rStudio. Up until now I am very pleased with all of them. Any tips or suggestions? –  The_Cthulhu_Kid Jan 4 '13 at 14:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.