This repository contains all the material for the Logic and Machine Learning course laboratory sessions.
During these sessions, you will learn how to use the Julia programming language together with the Sole.jl framework for training and analysing symbolic machine learning models, leveraging various logics.
The material is provided in the form of Jupyter notebooks (files with .ipynb extension), which is the standard for writing, sharing, and reproducing scientific computing scripts.
Have fun! 😄
If you are using Windows, you can install Julia by running the following in the command prompt:
winget install --name Julia --id 9NJNWW8PVKMN -e -s msstore
If you are using macOS or Linux, you can install Julia by running the following in your terminal:
curl -fsSL https://install.julialang.org | sh
This will install the latest stable version of Julia, as well as the juliaup tool. Start Julia from the command-line by typing julia.
For more information, please visit Julia's official page.
Please note that the provided material was written using Julia 1.11. Hence, we suggest installing the 1.11 version explicitly as well:
juliaup add 1.11
To run the notebooks, we suggest installing VS Code using the installer provided from its official website.
Once installed, open the Extensions view (Ctrl+Shift+X), then enter the keyword julia and install the extension maintained by the julialang organization.
This repository contains a Project.toml file, which is necessary to locally setup a self-contained Julia project and accommodate all the dependencies we are going to need.
To download the repository, click the <> Code button in the GitHub page of the course and select Download ZIP.
Then, unzip it where you prefer on your system, open the logic-and-machine-learning folder in a terminal window and write julia to start a new Julia session.
First, we need to import the built-in package manager:
using PkgThen, we need to activate the project, i.e., we need to specify to Julia that we are working inside this folder:
Pkg.activate(".")Finally, we use the method instantiate to install all the dependencies specified in the Project.jl file:
Pkg.instantiate()This will install all dependencies, including:
- DecisionTree.jl: the standard implementation of decision trees and random forests in Julia;
- SoleLogics.jl: a package containing the base definitions for playing with (modal) logic;
- ModalDecisionTrees.jl: a machine learning algorithm for extracting modal decision trees.