This repository contains a Jupyter notebook and Python scripts that require specific dependencies. To make it easy to replicate the environment, we use a Conda environment and include an environment.yml
file to manage dependencies.
-
Conda: Ensure you have Conda installed. If you don't have Conda installed, you can download and install it from the Miniconda website or the Anaconda website.
-
Jupyter: We'll use Jupyter Notebook for running the Python scripts and analysis.
Follow these steps to set up your Conda environment and run the Jupyter notebook:
Clone the repository to your local machine:
git clone https://github.com/ecole41/S1_coursework_test
cd copying_coursework
conda env create --file environment.yml
conda activate s1_env
To open the directory in the form of a Jupyter Notebook run:
jupyter notebook
In this directory, the Coursework_S1.ipynb
file contains all of the code needed to produces results. Please run this whole notebook.
The Python scripts Parametric_bootstrapping.py
and sWeighting.py
have already been run and their results saved in the Parametric_Bootstrapping_Data
and sWeighting_Data
folder respectively, so there is no need to run these again.
But if you wish to run the Python scripts to generate and analyse the Parametric Bootstrapping data and analyse using sWeights, then run these commands:
python Parametric_bootstrapping.py
and
python sWeighting.py
These modules have been parallelized to improve efficiency.