0 votes
1 view
in Machine Learning by (15.7k points)

I'm hoping to use either Haskell or OCaml on a new project because R is too slow. I need to be able to use support vectory machines, ideally separating out each execution to run in parallel. I want to use a functional language and I have the feeling that these two are the best so far as performance and elegance are concerned (I like Clojure, but it wasn't as fast in a short test). I am leaning towards OCaml because there appears to be more support for integration with other languages so it could be a better fit in the long run (e.g. OCaml-R).

Does anyone know of a good tutorial for this kind of analysis, or a code example, in either Haskell or OCaml?

1 Answer

0 votes
by (33.2k points)

There are an SVM, a simple decision tree and a logistic regression in OCaml. You can implement them to have a feeling of how machine learning models can be built in OCaml.

You can also try Owl library for scientific and numeric computations in OCaml.

F# is a new .Net language similar to OCaml. Check out this factor graph model written in F# for analyzing Chess play data. This research also has a NIPS publication.

FP is also suitable for implementing machine learning and data mining models. FP supports parallel computing better than imperative languages, like C# or Java. But implementing a parallel SVM, or decision tree has very little language dependency. The numerical optimizations behind machine learning and data mining are usually crucial, to write them pure-functionally is usually hard and less efficient. If you want to run 100 SVMs in parallel, then FP can help easily. But I don't see the difficulty running 100 libsvm parallel in C++, not to consider that the single thread libsvm is more efficient than a not-well-tested Haskell SVM package.

FP languages usually have a top-level interpreter, you can test your functions on the fly.

I hope this answer helps.

Also, if you are willing to indulge in a comprehensive course on it then you can join an online machine learning course.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...