Trying numl on OSX with F# and Xamarin

Today, at devLink 2014, my last session of the day is “Practical Machine Learning – Predicting Things” by Seth Juarez. In his presentation, Seth talks about machine learning and his machine learning library, numl. The session is very entertaining and I learn a lot from it.

Fun fact: Seth originally called his library, Machine Learning Library for .NET. But when he met Phil Haack at Mix 2011, Phil recommended him to find a shorter name. So Seth just changed his library name to numl to make it sounded like nuGet. 🙂

I have played with numl earlier this year by writing short F# script. After the session today, I just want to look at it again and see if my short F# script could still be run on OSX with Xamarin/Mono.

Here are some quick instructions:

1. Open Xamarin Studio and create a F# Library project.

Screen Shot 2014-08-28 at 10.37.51 PM

2. Create C# Library project and add numl NuGet package to C# library.

Screen Shot 2014-08-28 at 10.39.35 PM

Screen Shot 2014-08-28 at 10.43.00 PM

Screen Shot 2014-08-28 at 10.43.46 PM

3. Add Tennis class and data set from here or here.

Screen Shot 2014-08-28 at 10.44.25 PM

4. In F# Library project, I copy my existing F# code, adjust reference locations a little bit, and run it. Everything seems to work flawlessly!

Screen Shot 2014-08-29 at 2.49.52 PM

That’s it. It’s good to learn that my existing F# code can run smoothly on OSX. Hopefully, I’ll have sometime playing with numl more when I am back to Nashville.

Good night from Chattanooga!