[Question] Can this be used in place of R? #2661
Replies: 9 comments
-
In a word, no We might be able to help you more if you share what you are trying to achieve instead, as R and MathJS aren't usefully comparable. R is an entire language, MathJS is a library, the things they have in common are an expression parser (a subset of many languages) and a collection of builtin functions. MathJS is more like a math library (just as there would be math libraries for R or Python), additionally it has a very good expression parser which makes using various math operators and functions much more pleasant in JavaScript, and similar to something like mathematica. |
Beta Was this translation helpful? Give feedback.
-
In summary, I am a web developer that would like to use the tools I am comfortable with (JavaScript) for data science. Since lots of the statistics packages don't exist for js, It seems I need to use R then transfer its output to the web by exporting using its own api. |
Beta Was this translation helpful? Give feedback.
-
I see, so you need the functionality of specific statistical packages in R, and would prefer to have the same functionality available in JavaScript. And the alternative is to find a common data format between the two languages and libraries (most likely with some conversion or serialisation in-between). I'm not a data scientist, maybe there are others here but you might get more info faster if you share the specific features of these R libraries you are trying to use, the features/functions you require may already exist in mathjs, or they may be easy enough to implement (you can also easily customise and extend mathjs with your own functions and operators if they are not very up-streamable for some reason). |
Beta Was this translation helpful? Give feedback.
-
I have not tried R or math.js that much but I've been reading a lot about data science lately and have similarly been interested in using java script as my language of choice. Java script has many advantages compared to the other script languages and actually performs better then python in many cases. The only place it falls short at the moment is the actual number crunching and the reason is that python, and R uses packages written in C and fortran to do the actual math. This makes them really fast and this becomes crucial when you want to process really big datasets. Math.js seems like a great library and have one of the best api's I've seen, however performance wise it does not seem to be a good choice for serious data science where you care about speed. I would love to see some performance improvement to math.js and see it become javascripts answer to numpy/scipy but until then I would try to look at some other solution. For javascript vectorious might be an alternative. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input @robinjac. Yeah I would love to improve the performance of mathjs too :D |
Beta Was this translation helpful? Give feedback.
-
Maybe you should look into collaborating with deeplearnjs, they are high perf. |
Beta Was this translation helpful? Give feedback.
-
Yes definitely. There are a couple of libraries that could be interesting to integrate, like ndarray. |
Beta Was this translation helpful? Give feedback.
-
Or look into GPU powered solutions, see http://gpu.rocks/ |
Beta Was this translation helpful? Give feedback.
-
Anyone interested in looking into better performing matrix implementations for math.js? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions