Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 2.24 KB

README.md

File metadata and controls

52 lines (36 loc) · 2.24 KB

Project

The project was tested with Python 3.12.2, 3.11.9 and 3.10.11.

Building

To only run the Python code, create a virtual environment (recommended) with python3 -m venv .venv and activate it with source .venv/bin/activate (or in Windows .\.venv\Scripts\activate). Then install the requirements with pip install -r requirements.txt. Afterward, you can run the Python module with:

python -m project --all

This will run all the project parts (due to the --all flag) and save the plots under the images directory.

Configuration

To view all the available options run the command:

python -m project --help

For example, to only run labs 2 and 5, you can use the command:

python -m project --labs 2 5

To build the report you can pass the --compile_pdf flag, for example:

python -m project --compile_pdf --all

You can also suppress the output with the --quiet flag.

File Structure

The project is structured as follows:

  • data: Contains the Datasets used in the project (training/validation and evaluation).
  • models: Contain the JSON serialized representation of the best configuration of each model for our application prior $\tilde{\pi} = 0.1$, not compressed to make them human-readable.
    • scores: The scores of each model on the application prior $\tilde{\pi} = 0.1$ will be saved here.
  • project: Contains the Python module with the project code.
    • labs: Contains the code for each part of the project grouped by lab.
    • funcs: Contains common functions for the project (like DCF, PCA, LDA etc...).
    • classifiers: Contain the four classifiers used in the project, the Binary Gaussian, Gaussian Mixture Model, Support Vector Machine and Logistic Regression classifiers.
    • tests: Contains some testing code.
    • figures: Contains the code for the plotting and terminal pretty printing.
  • report: Contains the Typst code for the report.
    • imgs: Contains the images generated by the project.
    • chapters: Contains the Typst code for each chapter of the project (one for each lab).