[mlpack] Ruby binding for mlpack

Shekhar Prasad Rajak shekharstudy at ymail.com
Fri Jan 18 03:56:28 EST 2019


Hi Ryan,
Thanks for sharing the links. I tried to understand the codebase of mlpack and bindings in my spare time. I have gone through the documentations and  tried to Ruby binding using `mkmf` ruby gem. I am able to use mlpack methods in Ruby C extension. Main points I notice is :
1. What will be input and output format for Ruby binding (methods should take same options as mlpack cpp program) ? I found that for python binding, mlpack is using NumPy and Pandas for data source and output. Using Cython passing the data into arma matrix.
So for Ruby binding it can use daru ruby gem for importing data and for data frame.
2. Loading data source is fast in mlpack, so it would better to use the data loader from ruby code. 

Currently for debugging cpp changes I was writing testcase and running `bin/mlpack_test testcase_name` with some cout statements. I also tried gdb debugger.

I was trying to debug mlpack  Python and command line binding but I didn't understand how to do it. let me know if there is any good way to use (run the changes) the build directly (or local mlpack source) without installing it(means without running cmake and make install) into the machine.  

Thanks and regards,Shekhar Prasad Rajak,
Contact : +918142478937, 7987406203Skype: shekhar.rajak1
 

    On Wednesday, 19 December 2018, 9:42:52 am GMT+5:30, Ryan Curtin <ryan at ratml.org> wrote:  
 
 On Mon, Dec 17, 2018 at 03:59:38PM +0000, Shekhar Prasad Rajak wrote:
>  Hi� team,
> Myself Shekhar and I really like mlpack library. It's command line and
> Python binding features are amazing. I am very much interested to
> contribute to mlpack.� I see that Ruby binding for mlpack is not
> available. Since I have good knowledge in Ruby (Successfully completed
> GSoC 2017 under SciRuby) and C++, I am planning to work on this.�
> I don't have much idea about Ruby binding for C++ library, I am going
> through articles and Ruby binding related projects to get a start. I
> have read most of the links�related to mlpack contribution and have
> setup the development version in my system.
> If anyone have idea (or have already discussed ) about Ruby binding,
> please share the link. It will really help me. I am also discussing
> the idea with SciRuby contributors and looking into Python binding
> code.�

Hi there Shekhar,

I'm glad to hear you like mlpack.  For the automatic bindings project, I
do think Ruby might be an interesting language to add bindings to, but
note that this would not be a simple process of using Ruby tools to
simply wrap everything in the mlpack library.  Instead, the goal is to
build out an automatic binding generator for Ruby that can produce
bindings of the exact same type and format we do for the command line
and Python.

If you're interested in that, probably a great thing to do would first
be to get familiar with the library (http://www.mlpack.org/involved.html
and http://www.mlpack.org/gsoc.html could be helpful), and use the
command line and Python bindings to get a feel for how they work.  Also
you could read through the open PR for Go bindings and take a look at
those to understand them.

There is documentation on the automatic binding system here which could
also help:

http://mlpack.org/docs/mlpack-git/doxygen/bindings.html

I hope this helps. :)

Thanks,

Ryan

-- 
Ryan Curtin    | "But feel, to the very end, the triumph of being
ryan at ratml.org | alive!"  - J�ns
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20190118/65972251/attachment.html>


More information about the mlpack mailing list