Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Your experiences with Matlab/F#/R for data analysis and modeling algorithms

Tags:

r

matlab

f#

I've been using F# for a while now to model algorithms before coding them in C++, and also using it afterwards to check the results of the C++ code, and also against real-world recorded data.

For the modeling side of things, it's very handy, but for the 'data mashup' kind of stuff, pulling in data from CSV and other sources, generating statistics, drawing charts etc., my colleague teases me no end ("why are you coding that yourself? It's built in to MatLab").

And I have another colleague who swears by R, which also has charting stuff 'built-in'.

I know that MatLab, R and F# are not strictly comparable, so I'm not asking for a 'feature comparison shoot out'. I just wondered what other people are using for these kind of pre- and post-analysis scenarios, and how happy they are with it.

(If there's anyone out there working on wrapping Microsoft Charts into something F#-friendly, let me know, I'd be happy to participate...)

(Note: answers to this question will be subjective, but based on experience, please)

like image 535
Benjol Avatar asked Oct 29 '09 08:10

Benjol


People also ask

What is MATLAB used for in real life?

Millions of engineers and scientists worldwide use MATLAB for a range of applications, in industry and academia, including deep learning and machine learning, signal processing and communications, image and video processing, control systems, test and measurement, computational finance, and computational biology.

What can you learn from MATLAB?

You will learn fundamental computer programming concepts such as variables, control structures, functions and many others. You will learn about various data types and how to handle them in MATLAB. You will learn the powerful support MATLAb provides for working with matrices. You will learn about file input/output.

How useful is learning MATLAB?

MATLAB is a very important program that many engineering students and engineers must learn. It helps to perform mathematical calculation, design, analysis and optimization (structural and mathematical), as well as gives speed, accuracy and precision to results.


1 Answers

I have very little experience with F#, but regarding C++/Matlab/R: If the speed of your program's execution is the most important, use C++. If speed of implementation is the most important, use Matlab or R. This is true for a number of reasons, not the least of which is their massive libraries of math/stats packages.

Both Matlab and R can be sped up through parallelism: so generally, I think that speed and quality of implementation should be a bigger concern. That's where the real "value" of programming is taking place, in the design of the application. It's not a minor proposition if you can write 3 or 4 good R programs in the same time it takes you to write 1 good C++ program.

Regarding F#: so far as it is part of Microsoft's framework, it must have a lot to offer. If you're developing in Visual Studio or working on a big .Net project (for instance), it might make sense to use F#. On the other hand, you can call both Matlab and R from .Net applications, so I would probably argue that their libraries should be a bigger concern. For instance, see this article as an example for R and the Matlab Builder.

Long story short: comparing F# and Matlab/R isn't a good comparison. F# is a general purpose programming language, while Matlab/R can be viewed as massive mathematical/data analysis toolkits. Some people call Matlab or R from F# in order to take advantage of each language's benefits (e.g. see this discussion, this article on Matlab/F#, or this article on R/F#).

So far as charting is concerned: R is extremely strong on this front. Have a look at the graphics view on CRAN and this series of posts on the LearnR blog about Lattice and ggplot2.

like image 194
Shane Avatar answered Nov 09 '22 12:11

Shane