Skip to content

Repository files navigation

A3 Coursework Repository

Overview

This repository includes the following main files/folders:
requirements.txt and pyproject.toml outlines dependencies of coursework codes and repository info
question_a2.ipynb contains workings for question A2
question_b1.ipynb contains workings for question B1
question_c1.ipynb contains workings for question C1
report/ contains the report a3_coursework_report.pdf
data/ contains saved data from notebooks that can be loaded to avoid having to run certain lengthy processes repeatedly
src/a3_package contains python codes used in the coursework. In particular:
src/a3_package/a2.py contains codes used for question A2, and
src/a3_package/c1.py contains codes used for question C1

How to use

Create and activate venv for the repository

# make sure your current directory is the coursework repository
mkdir .env
cd .env
python -m venv a3_cw
source a3_cw/bin/activate

Go back to the root of the repository and install required packages

cd ..
pip install -r requirements.txt

While in the root directory, install the coursework package

pip install -e .

The package can be imported using

import a3_package

Otherwise, use relative imports in the notebooks

from src.a3_package import *

Create jupyter kernel for running the notebooks

python -m ipykernel install --user --name a3_cw --display-name "a3_cw"

or

ipython kernel install --user --name=a3_cw

In the notebooks, select a3_cw as your jupyter kernel

Declaration of use of auto-generation tools:

As stated in the report, ChatGPT/GitHub Copilot has been used for the following purposes only:
(1) Auto-completion of lines of code based on repetition; and
(2) Docstring suggestions which are then revised.

About

This repository contains the code, data and report for a coursework project that mainly focuses on learning and sampling complex distributions using normalizing flows

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages