5 ms·
AI4R: Ruby Artificial Intelligence lib
- delinquentme 15y agoincluding stochastic Models, and sigmoid curves =]
- pkananen 15y agoMight be a nice companion for the Stanford Engineering AI Class that is offered this fall. http://www.ai-class.com/ http://www.ai-class.com/
- delinquentme 15y agoActually I've began petitioning for a 4th complementary class. If you're interested: http://www.reddit.com/r/aiclass/comments/jkg6v/stanford_open_bioinformatics_class/ http://www.reddit.com/r/aiclass/comments/jkg6v/stanford_open...
- cageface 15y agoIt's nice to have this available but a lot of AI techniques are fairly computation-intensive. A language like Ruby isn't going to be very efficient for non-trivial datasets.
- getsat 15y agoAnything that needs C-like levels of performance in Ruby can be implemented in C. The C Ruby API is pretty straightforward. :)
- cageface 15y agoI've written C extensions for Ruby and I agree the API is really nice. But a lot of the most useful AI/Machine Learning algorithms involve chunking big data sets through computationally intensive algorithms. This just isn't a strong point for Ruby, C-extension or no.
- wnight 15y agoPremature optimization. If your code runs slowly on larger datasets it'll be easier to write what you need in C then than it will be to guess what you need now.
- delinquentme 15y agoCan you flesh this statement out a bit more? Yes, I'm going to be working with big datasets and if possible I'd like to put the time I've spent learning Ruby to good use. At the same time I'm not at all against learning C++ / java
- Cushman 15y agoWrite your program in Ruby. Make it as fast as you can. Parts will still be slow. Write C extensions for those parts. Eat your cake.
- wnight 15y agoYou probably won't hit a limit, CPUs are fast and even "slow" Ruby can do quite a lot. If you do hit the limit though, and have exhausted algorithmic improvements, you've got your Ruby as an acceptance test for your C++ which will make it unimaginably easier to write correctly. If you tried to do it up front you'd blow up the requirements, if you do it after you've profiled your real-world code you may only need a few lines of critical code.
- mitchty 15y agoI think everyone needs to differentiate language, ruby, from implementation, aka the standard mri vm. The stock mri vm has a gil, and historically, with 1.8, a very naive iterpreter+garbage collector. 1.9.x helps with this, but still suffers performancewise unless you get into massive object creation/etc... The difference is alternative implementations like jruby+rubinius can drastically shave time off of computation. Much like the difference of CPython to pypy. If however you're overly worried about computational speed and need to have the fastest possible speed bar none, then do the right thing and use c++/java/c. But for exploratory learning or non-time critical computation, why not use a language like Ruby or Python or Lua or whatever?
- cageface 15y agoAll the benchmarks I've seen put JRuby and Rubinius within a factor of 2x or so of 1.9.2 MRI, so you can't count on them to give you a big boost. But, like you say, there's nothing wrong with using a lighter-weight language to explore. Although Python with numpy/scipy and Matlab/Octave are way ahead here.
- delinquentme 15y agoPython with numpy/scipy and Matlab/Octave are way ahead here ^^ is this the case in terms of speed? or are you saying ease of exploratory programming?
- cageface 15y agoI haven't actually tried this new Ruby library but numpy/scipy and even more so Matlab are widely used in the ML/AI community. You can find tons of sample code, books, blogs etc that use these tools so it's a lot easier to get started. Numpy is also pretty fast so you may actually get away with pushing your exploratory code into production depending on your scale. Also, the graphing capabilities of Numpy or Octave can be extremely helpful in exploring your data and figuring out what your code is doing.
- mitchty 15y agoTrue on Jruby/rubinius, its highly dependent on what the code does. I've seen 2x faster runs on rubinius over 1.9.2. And on the other end of the spectrum, I've seen some of my unit tests take over an hour. They take 10 minutes on 1.8.7 on a slow day and cache. And agree on the python bit, ruby may win for a web language/system administration bits, but python definitely has the leg up with support and use in the sciences.
- eddanger 15y agoI'll wait until this gem reaches self-awareness and moves itself to github.
- mcginleyr1 15y agohttps://github.com/SergioFierens/ai4r https://github.com/SergioFierens/ai4r Been on github a long time. I was working on a constraint propagation fork till I got bogged down with work/life.
- delinquentme 15y agogem install ai4r