Skip to content

Full Python implementation of an agent-based simulation model of generalized higher education institutions. Thousands of experiments are conducted and model feature significance is found through regression, SHAP, and permutation.

Notifications You must be signed in to change notification settings

wyattowalsh/higher-education-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conceptualizing Higher Education Institutions:
An Agent-Based Modelling Approach


Link to cloud hosted simulation experiment data analysis and modelling notebook: Binder

Link to project paper: Conceptualizing Higher Education Institutions Paper

Link to datasets: Experiment 1 and All Experiments


Explanation of Repository Contents

.
├── README.md   This file
├── paper.pdf   Project Write-Up
├── environment.yml   Conda environment configuration file (ssed to load project dependencies)
├── nb.ipynb   Jupyter Notebook used for data analysis and modelling (hosted at the above Binder link)
├── .gitignore   Git file used to ignore non-repo local files
└── srcDirectory containing custom scripts
    ├── __init__.py
    ├── agent.py   Agent class definition (agent instantiation and opinion variation)
    ├── data_functions.py   Helpful functions to manipulate data
    ├── data_operations.py   Main data file used to prouduce data (utilizes Apache Spark)
    ├── data_processing.py   Short script to fix time data writing issue in simulation
    ├── environment.py   Environment class definiton (establishes agents, holds data, increments time, conducts group negotiations)
    ├── main.py   Script to run collection of experiments
    ├── model.py   Model class definition (sets enviroment, generates collection of experiment parameters, conducts experiments)
    ├── utilities.py   Helpful functions used throughout simulation
    └── visualization.md   Mermaid markdown snippet dump for flowcharts


Instructions for Usage

environment.yml can be found in the repository's root directory and used to install necessary project dependencies. If able to successfully configure your computing environment, then launch Jupyter Notebook from your command prompt and navigate to nb.ipynb. If unable to successfully configure your computing environment refer to the sections below to install necessary system tools and package dependencies. The following sections may be cross-platform compatibile in several places, however is geared towards macOS1.

Do you have the Conda system installed?

Open a command prompt (i.e. Terminal) and run: conda info.

This should display related information pertaining to your system's installation of Conda. If this is the case, you should be able to skip to the section regarding virtual environment creation (updating to the latest version of Conda could prove helpful though: conda update conda).

If this resulted in an error, then install Conda with the following section.

Install Conda

There are a few options here. To do a general full installation check out the Anaconda Download Page. However, the author strongly recommends the use of Miniconda since it retains necessary functionality while keeping resource use low; Comparison with Anaconda and Miniconda Download Page.

Windows users: please refer to the above links to install some variation of Conda. Once installed, proceed to the instructions for creating and configuring virtual environments [found here](#Configure-Local-Environment

macOS or Linux users: It is recommended to use the Homebrew system to simplify the Miniconda installation process. Usage of Homebrew is explanained next.

Do you have Homebrew Installed?

In your command prompt (i.e. Terminal) use a statement such as: brew help

If this errored, move on to the next section.

If this returned output (e.g. examples of usage) then you have Homebrew installed and can proceed to install conda found here.

Install Homebrew

In your command prompt, call: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Miniconda with Homebrew

In your command prompt, call: brew install --cask miniconda

When in doubt, calling in the brew doctor might help 💊

A Few Possibly Useful Conda Commands

All environment related commands can be found here: Anaconda Environment Commands

Here are a few of the most used ones though:

List all environments (current environment as marked by the *): conda env list

Create a new environment: conda create --name myenv

Activate an environment: conda activate myenv

Deactivate an environment and go back to system base: conda deactivate

List all installed packages for current environment: conda list

Configure Local Environment

Using the command prompt, navigate to the local project repository directory -- On macOS, I recommend typing cd in Terminal and then dragging the project folder from finder into Terminal.

In your command prompt, call: conda env create -f environment.yml. This will create a new Conda virtual environment with the name: higher-education-simulation.

Activate the new environment by using: conda activate higher-education-simulation

Access Project

After having activated your environment, use jupyter notebook to launch a Jupyter session in your browser.

Within the Jupyter Home page, navigate and click on nb.ipynb in the list of files. This will launch a local kernel running the project notebook in a new tab.
















1: This project was created on macOS version 11.0.1 (Big Sur) using Conda version 4.9.2, and Python 3.8 (please reach out to me if you need further system specifications).

About

Full Python implementation of an agent-based simulation model of generalized higher education institutions. Thousands of experiments are conducted and model feature significance is found through regression, SHAP, and permutation.

Topics

Resources

Stars

Watchers

Forks