The Haskell Brain
Machine Learning and AI in Haskell
The Haskell Brain
Machine learning is one of the most important skills in software today. The field has typically been dominated by languages like Python (through TensorFlow and PyTorch) and R. So it's a bit frustrating for Haskell fans who want to use this awesome language as widely as possible but struggle to apply it to this critical domain.
However, there are a few tools out there that allow us to use Haskell for machine learning! Chief among these are the Haskell Tensorflow bindings. They aren't easy to use though, and there aren't many tutorials either!
The Haskell Brain seeks to fill this gap. This course will walk you through all the important questions about getting started with Haskell and TensorFlow.
- What system setup is required?
- How are tensors represented in Haskell?
- How can I train a machine learning model with tensors?
If you're ready to start answering these questions, click that "enroll" button!
Course Content and Outline
The course content consists of 3 elements:
- Video Lectures
- Screencast Videos
- Programming Exercises
In video lectures, your teacher will introduce the core concepts of the lesson, including an in-depth breakdown of the code you need to implement the feature.
Screencast videos will show these concepts in action, in an IDE, so you can follow along.
Finally, you'll then get the chance to try the concepts for yourself with our detailed programming exercises. These exercises are the most important part of the course! By writing the code and applying the concepts yourself, you'll build up the confidence to use these ideas in your own projects.
This short course has roughly 4 different parts. Here are the different areas you'll cover:
Development Setup
The interaction of Haskell and TensorFlow is a complicated one! To make everything work, you'll need to install a few different system dependencies. This process is a bit tedious, but it's also enormously valuable for your development as a programmer. You'll gain important insights into how Haskell can interact with different systems.
Basics of Tensors
Once your system is ready, it's time to start learning about tensors! We'll learn the basics of constructing and running tensors in both Python and Haskell. Haskell, of course, is a bit more complicated since we have to keep track of more type information!
Learning Models
Once we understand tensors, we'll learn how to construct machine learning models, from simple linear representations to neural networks. We'll see a couple examples of representing these models as Haskell types.
Other Approaches
We'll conclude the course by considering an alternative approach to TensorFlow. The Grenade library allows us to perform machine learning, and it incorporates some uniquely "Haskell" ideas with dependent types!
For a lecture-by-lecture outline and FAQ, keep scrolling!
Your Instructor
James is a Software Engineer living in Atlanta, GA. He first discovered Haskell in college, but began using it consistently since 2015. His Haskell experience blends multiple side projects as well as professional work. In late 2016, he began the Monday Morning Haskell blog, where he publishes new Haskell content every week.
Course Curriculum
-
Start1: Course Introduction (5:29)
-
StartSpecial Note: Tensorflow V1 and V2 (1:49)
-
Preview2: Installation and Dependency Setup (10:05)
-
Preview3: Tensor Basics (14:37)
-
Start4: Simple Learning Algorithms (17:13)
-
Start5: Tensors in Haskell (13:33)
-
Start6: Learning Algorithms in Haskell (13:44)
-
Start7: Organizing Our Model (4:44)
-
Start8: Serializing with Cassava (6:14)
-
Start9: Basic Neural Networks (10:09)
-
Start10: Visualizing with TensorBoard (8:10)
-
Start11: Logistic Regression (10:55)
-
Start12: Convolution and Pooling (11:41)
-
Start13: Grenade and Dependent Types (15:09)
-
Start14: Course Conclusion (2:44)