V
V
Vitaly Stolyarov2016-07-28 00:12:41
Machine learning
Vitaly Stolyarov, 2016-07-28 00:12:41

Lua for machine learning?

Went through a bunch of articles comparing and evaluating Python, R, Lua. I am superficially familiar with these languages, and if we talk about weighing pros / cons, then in my case , Lua wins in terms of performance, pleasantness of syntax, integration
. But here it is rarely found in articles about Machine Learning. That's interesting, why? There is also Torch , which is used by Facebook, Google, Twitter, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bromzh, 2016-07-28
@Ni55aN

Any pythons usually use Cish and Fortran libraries directly for calculations, because this is the narrowest point.
So the performance of scientific packages in python is usually decent, and python itself acts as a kind of wrapper.
To be sure, lua and its luajit implementation are pretty fast. The latter is often faster than python, plus it has a convenient FFI. For embedding, the language is just great, but this is how the standalone language in application applications does not look so good.
However, the standard library of the Lua language itself is very sparse. And the number of libraries for different occasions is much less than that of python.
Plus, python as a language is more pleasant:
1) Typing is strong in it, as opposed to weak/implicit in lua.
2) There is a rich type system. There are complex numbers, and iterators, and collections, a bunch of everything. There are only 8 types in lua.
3) OOP in python is class based and similar to Java/C#/C++. In lua, OOP is prototyped and implemented through tables (and metatables).

S
Sergey, 2016-07-28
@begemot_sun

Because LUA was created for programmers, and mathematicians do all sorts of learning machines, they don’t care about performance, after 1 or 3 hours you get the result - it doesn’t matter. Therefore, they use the simplest thing - python, and its community is much larger.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question