I was wondering which language can I use: R or Python, for my internship in fraud detection in an online banking system: I have to build machine learning algorithms (NN, etc.) that predict transaction frauds. Thank you very much for your answer.
I would say that it is your call and purely depends on your comfort with (or desire to learn) the language. Both languages have extensive ecosystems of packages/libraries, including some, which could be used for fraud detection. I would consider anomaly detection as the main theme for the topic. Therefore, the following resources illustrate the variety of approaches, methods and tools for the task in each ecosystem.
scikit-learnlibrary: for example, see this page;
LSAnomaly, a Python module, improving
OneClassSVM(a drop-in replacement): see this page;
Skyline: an open source example of implementation, see its GitHub repo;
- A relevant discussion on StackOverflow;
- pyculiarity, a Python port of Twitter's AnomalyDetection R Package (as mentioned in 2nd bullet of R Ecosystem below "Twitter's Anomaly Detection package").
- CRAN Task Views, in particular, Time Series, Multivariate and Machine Learning;
- Twitter's Anomaly Detection package;
- Early Warning Signals (EWS) Toolbox, which includes
- h2o machine learning platform (interfaces with R) uses deep learning for anomaly detection.
Additional General Information
This is largely a subjective question. Trying to list some criteria that seem objective to me:
the important advantage of Python is that it is a general-purpose language. If you will need to do anything else than statistics with your program (generate a web interface, integrate it with a reporting system, pass it on to other developers for maintenance) you are far better off with Python.
the important advantage of R is that it is a specialized language. If you already know that there is a technique you want to use, and it is not a usual suspect (like NN), then you probably will find a library in CRAN that makes life easier for you.
And here is another, more subjective advice:
- both languages are not really performance-oriented. If you need to process large quantities of data, or process very fast, or process in parallel, you will run into trouble ... but it is far easier to run into such trouble with R than with Python. In my experience, you find the limits of R within some weeks, and the way to push them is quite arcane; while you can use Python for years, never really missing the speed that C developers always mention as the Holy Grail, and even when you do, you can use Cython to make up for the difference. The only real trouble is concurrency, but for statistics, it is hardly ever an issue.