This repository contains a module of Jakob's Scheduler that predicts course enrollment. It works by training several precictions models on historical enrollment data and past schedules to make accurate predictions about future enrollment.
This repository contains a simple Django webserver that runs inside a Docker container.
- Docker
docker-compose build
docker-compose up
The server exposes a single endpoint: /predict
. By default, the django server runs on port 8000,
but for compatibility with the rest of the scheduler, the docker container exposes port 8001.
http://localhost:8001/predict
This endpoint is used to make predictions about future enrollment. It takes the following parameters:
year
: int, the year for which to make predictionsterm
: string, the term for which to make predictions ('fall', 'spring', 'summer')courses
: Course[], A list of courses that will be included in the results
Course has the following structure:
{
"course": string,
"name": string,
"prerequisites": string[][],
"corequisites": string[][],
"terms_offered": string[]
}
The server will return a JSON object with the following structure:
{
"estimates": [
{
"course": string,
"estimate": int
},
...
]
}
The repository contains a directory data/
that contains two subdirectories:
client_data/
: contains local copies of data that is used for testing purposesmodel_data/
: contains temporary data that is used by the modelsscripts/
: contains scripts that were used to transalte between data formats
The repository contains a directory enrollment_predictions/
that contains the majority of the code.
It contains the following subdirectories:
models/
: contains the code for the machine learning modelsmodules/
: contains the code for other modules that do not use machine learningtests/
: contains the unit tests for the code
Other files in this directory are used by Django to run the server.
The repository also contains a simple data visualization tool that can be used to visualize certain
aspects of the data and models. It can be found in the Data Visualization/
directory.
- Python >= 3.9
This module also requires certain python packages that can be installed with:
pip install -r "Data Visualization/requirements.txt"
python "Data Visualization/visualization.py"