MLJTutorial.jl
Tutorials for introducing the machine learning toolbox MLJ (Machine Learning in Julia)
Based on tutorials originally part of a 3.5 hour online workshop delivered in 2020.
Updated August 2026.
Prerequisites
Familiarity with basic data manipulation in Julia: vectors, tuples, dictionaries, arrays, generating random numbers, tabular data (e.g., DataDrames.jl) basic stats, Distributions.jl.
Familiarity with Julia package management
Familiarity with Machine Learning fundamentals and best practice.
The tutorials
Basic
- Tutorial 1. Data Representation
- Tutorial 2. Selecting, Training and Evaluating Models
- Tutorial 3. Transformers and Pipelines
Advanced
- Tutorial 4. Tuning hyperparameters
- Tutorial 5. Advanced Model Composition
- Solutions to Exercises
- Lightning Tour of MLJ
Running tutorial code for yourself
You can find the annotated Julia scripts from which tutorials are generated in these directories. Package environment files for this repository are structured using Julia's package workspaces. To use with Julia 1.12 or later:
Clone this GitHub repository to your computer
In a terminal window change your directory to the root of the clone.
From that terminal, launch julia (preferably with the
--startup-file=noswitch) and runusing Pkg; Pkg.activate("."); Pkg.instantiate(workspace=true). This resolves a valid set of package for all the tutorials, downloads package code to your computer, and carries out some precompilation. This may take a few minutes. You need carry out this step only once.Activate the project for the particular tutorial of interest (as specified by Project.toml file in the corresponding directory).
Execute code blocks copied from the rendered tutorial (as linked above) or from the corresponding .jl script.
More about the tutorials
The tutorials focus on the machine learning part of the data science workflow, and less on exploratory data analysis and other conventional "data analytics" methodology
Here "machine learning" is meant in a broad sense, and is not restricted to so-called deep learning (neural networks)
The tutorials are crafted to rapidly familiarize the user with what MLJ can do and how to do it, and are not a substitute for a course on machine learning fundamentals. Examples do not necessarily represent best practice or the best solution to a problem.
Additional resources
Visit the MLJ Learn page for additional learning resources.
This repository is maintained with the help of NotebookManagementTools, an experimental, unregistered package embedded in the repository.