Practical Machine Learning with Functional Programming

Machine Learning and Functional Programming are both very hot topics these days; they are also both rather intimidating for the beginner. In this workshop, we’ll take a 100% hands-on approach, and learn practical ideas from Machine Learning, by tackling real-world problems and implementing solutions in F#, in a functional style.

In the process, you will see that once you get beyond the jargon, F# and Machine Learning are actually not all that complicated – and fit beautifully together. So if you are curious about what Machine Learning is about, and want to sharpen your developer skills, come with your laptop and… let’s hack together!

Course outline

In this course, you will be working on real-world datasets, applying a variety of machine learning techniques, using a functional programming approach. In the process, you will gradually learn simple but fundamental and widely applicable machine learning ideas, and develop a sense for what it means to “do machine learning”, and where there are similarities and differences with writing “normal” code.

Day 1

The Digit Recognizer: write and validate a program that recognizes hand-written digits. From scratch.

  • Setting up a machine learning experiment
  • Validating the quality of a model
  • The K-Nearest-Neighbors classifier
  • Distance
  • Preparing data using functional pipelines

Recognizing Languages: automatically detecting what language a piece of text is written in.

  • Transforming raw data (text) into usable features
  • Learning with gradient descent
  • The Perceptron (aka Logistic Regression), the building block of neural networks
  • Using Discriminated Unions (Algebraic Data Types) to model data structures

Working with large datasets

  • Reducing the dimension of data with PCA (Principal Component Analysis), Clustering with K-Means
  • Working with big data using mbrace

Day 2

Predicting Wine Quality: evaluate how good a wine is, based on its chemical characteristics.

  • Using Decision and Regression Trees
  • Combining weak prediction models into better ones with Random Forests
  • The problem of over-fitting
  • Using types to model machine learning experiments
  • Accessing data using F# type providers
  • Using an existing machine learning library

Forecasting Bicycle Usage: discover usage patterns in historical data to explain usage of a bicycle sharing service.

  • Making predictions with Linear Regression
  • Handling different types of input: continuous/numeric and discrete/categorical features
  • Feature engineering: creating and combining data into informative features

What attendees say