Is F# ready for Machine Learning and Data Science?
Recently I have been interested in learning more about machine learning. My go-to programming language these days is F# so naturally I turned to F# when looking into machine learning.
One can find lots of books about machine learning using either Python or R. The literature is more limited when it comes to F# but a quick search at Amazon resulted in two recent books:
- F# for Machine Learning by Sudipta Mukherjee
- Machine Learning Projects for .NET Developers by Mathias Brandewinder
In addition, there is quite a lot of useful information at the websites FsLab and Guide - Machine Learning with F#. Most of the resources in the latter points to blog post about how to implement various Machine Learning algorithms in F#. My main interest is to use well proven and standard open source implementations.
When it comes to data manipulation F# really excels. The combination of the F# REPL and the F# Data project works really well together.
The report Analyzing and Visualizing Data with F# by Tomas Petricek provides a number of reasons for using F# for Data Science. The arguments focuses on topics like data access, correctness, efficiency, scaling, and integration. Personally I think the selling point would be strong platform support for visualization and standard algorithm implementation.
In the end Data Science and Machine Learning boils down to algorithms and models and the ability to create visualizations.
For visualization there is XPlot but it feels nowhere as mature as Matplotlib for Python or ggplot2 for R.
It is possible to access R functionality through F# using the R type provider but getting this to work in a productive environment on OSX is quite a hassle.
When it comes to algorithms and models for machine learning F# and in general the .NET platform seems to lack support.
Sure one can find a linear regression algorithm in Math.NET Numerics but more complex algorithm are hard to find in open source versions. One could argue that these algorithms could (to some degree easily) be implemented in F# but I want to apply these algorithms to solve problems. Not learn how to implement the algorithms.
What do you think? Is F# and .NET a great platform choice for doing machine learning? F# can be used for machine learning but I think it comes with a productivity price when it comes to using standard models and visualizations.
Please comment if you disagree. I would love to be proven wrong!
Please create issues at the Github repo Twitter.
Edit page on GitHub. Please help me to improve the blog by fixing mistakes on GitHub. This link will take you directly to this page in our GitHub repository.
There are more posts on the front page.
Content of this blog by Carsten Jørgensen is licensed under a Creative Commons Attribution 4.0 International License.