Machine Learning in Torch: GBM, RF, FM

150 views
Skip to first unread message

Torchee

unread,
Aug 9, 2016, 4:40:23 PM8/9/16
to torch7
Hi Torch community,

I am a new user of Torch, and really loving the speed and elegance of Lua. 

Some ML algorithms are core for almost all problems (as demonstrated on Kaggle), and I am trying to find Torch implementations or wrappers for them.  I will appreciate if the community can point me in right direction:

Gradient Boosting Machines:  ?
Random Forests or ExtremeRandom Forests:  ?
Factorization Machines (libFM) or Field-aware Factorization Machines (libFFM): ?

Algo descriptions for these Algos are here: http://scikit-learn.org/stable/modules/classes.html#module-sklearn.ensemble

Thank you!

dslate

unread,
Aug 25, 2016, 1:32:44 AM8/25/16
to torch7
I don't know if this is suitable for your needs, but here is what I did.  I am a long-time
user of R, including its machine learning packages such as Random Forests and Gradient
Boosting Machines, for Kaggle contests and other purposes.  I also like lua, which I have
used for several years, and more recently have started employing LuaJIT/Torch for, among
other things, building neural networks.  I wanted a way to access the machine learning and
data analysis facilities of R from a Torch program, and after some research, settled on
scilua (scilua.org/), which is LuaJIT-based and has a package called rclient for
interfacing to R.  Here is a post I wrote about this last year:

  https://groups.google.com/forum/#!topic/torch7/uX7FTEtjT5Y

This method actually works pretty well.  One caveat: scilua is LuaJIT-based but knows
nothing about Torch, so transferring Torch tensors to R (and back) via rclient involves a
temporary conversion to lua tables.  In the case of big tensors (multiple GB) this
conversion runs into LuaJIT's known limitations on the memory consumed by its own objects
(this limitation does not apply to Torch tensors, which live in a different space).  If
the proposed new garbage collector and memory manager for LuaJIT ever gets done this
limitation might be lifted, but meanwhile very big tensors have to be split into pieces
for transfer and glued together at their destination.

I hope this helps.
Reply all
Reply to author
Forward
0 new messages