During last 10-15 years, machine learning gradually moved from academia to industry. There are many open source frameworks like Scikit Learn, Spark MLlib and hundreds of lines of R code available for applied developers. Yet experimenting and development of machine learning algorithms remain difficult problems. Functional programming languages like Haskell, OCaml and F# have appealing semi-mathematical notation that greatly simplifies machine learning algorithms implementation, but could meet required performance restrictions. Semagle F# Framework is a successful experiment that demonstrates how to create and refine the functional code for clarity and performance, and now its code is available on GitHub.
At the current stage, Semagle F# Framework provides only vector and SVM classification and regression libraries. However, the SVM library is not tied to numeric vectors and works with any object type that have a suitable kernel. F# is a very concise language and a typical SVM classifier training and test phases look like:
The SVM library is designed for extensibility (works with any data type and kernel function) and performance (data types and kernels do not need to implement common interfaces), and, thus, does not provide model serialization support. The actual performance is quite impressive on .Net Core 1.0.1 (see MacOS and Windows detailed results):
|Time (seconds)||LIBSVM 3.20 Native||Mono 4.4.2||.NET Core 1.0.1|