Skip to content

dwhitena/gc-ml

Repository files navigation

Alt text

Machine Learning and AI with Go

These materials are for the 2019 "Machine learning and AI with Go" workshop at GopherCon. The workshop provides an intensive and idiomatic view on training, utilizing, evaluating, and deploying machine learning and AI models using Go. This class is perfect for gophers wanting an approachable, code-first introduction to ML/AI.

Note: This material has been designed to be taught in a classroom environment at GopherCon. The code is well commented but missing some of the contextual concepts and ideas that will be covered in class.

Agenda

9:00-9:30 Introductions, Logistics 🎤
9:30-10:45 Introduction to ML/AI 🧠
10:45-11:00 Break ☕
11:00-12:00 Linear and Logistic Regression 📈
12:00-1:15 Lunch 🍕
1:15-2:45 Neural Networks, Deep Learning 🤖
2:45-3:00 Break ☕
3:00-4:30 Hands on ⌨️
4:30-5:00 Next steps, Conclusions 💥

Introduction to Machine Learning and AI 🧠

This session introduces the basics of Machine Learning and AI along with a whole bunch of related jargon. Are ML and AI the same thing or are they different? What differentiates them from traditional software engineering? How does a machine learn anyway? We will answer these questions and many more, such that you can communicate well with data science teams and understand the steps involved in most machine learning workflows.

See slides

Linear Regression 📈

There are a couple fundamental AI building blocks that show up all over AI applications. These are linear regression and gradient descent. In this session, we will explore these building blocks by implementing them from scratch in Go. We will then utilize the github.com/sajari/regression package to extend our linear regression model to a multiple regression model.

Linear regression code examples:

Logistic Regression 📈

Linear regression is great, but there's only so much you can do with it. It is, after all, limited to modeling rather simple relationships where one thing is proportional to changes in another thing. Not all relationships are like that. In particular, classification problems require us to model discrete states or categories, not continuous values. In this session, we will move from linear regression to logistic regression such that we can model non-linear relationships.

Logistic regression code examples:

Neural Networks 🤖

Ok, in this session we finally get to the thing everyone is interested in... neural nets! Despite the intimidation that normally surrounds these seemingly magical, brain-like things, they aren't that much more complicated than our previous regression models. In this session, we will implement a simple neural network from scratch with Go to understand the fundamentals.

Neural Network code examples:

Deep Learning 🤖

In this final teaching session, the concepts get very deep. We will take our basic neural network and figure out how we could modify it to be a deep learning neural network (because, after we know about deep learning, we can all ask for a raise at our company). These super powerful networks can do amazing things, and it's not that difficult to leverage them in your Go applications!

Deep Learning code examples:

Hands on ⌨️

Based on feedback from previous GopherCon workshops, this iteration will include a couple hands-on options for the final session:

  1. Try your hand at training some of your own ML/AI models using publicly available data. Miriah Peterson was nice enough to compile some data sets where you will be able flex your regression, classification, and neural net muscles. See here for more information and instructions on getting started.
  2. Learn how infrastructure projects written in Go (Docker, Kubernetes, Pachyderm, and Minio) can be used to deploy production ML/AI model training and inference. If you choose this option, you will follow a tutorial that will walk you through deploying a production ML pipeline on top of Kubernetes. See here for more information and instructions on getting started.

The instructors and TAs will be available for questions during this time, but you can also follow up with the instructor during the rest of GopherCon or on Gophers Slack.


All material is licensed under the Apache License Version 2.0, January 2004.