This repository contains notebooks and data for mapping submission patterns to target outcomes for 4 courses. It includes data in data/, processing scripts, and modeling notebooks (DT, RF, XGB, 1D CNN).
- Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install dependencies:
pip install -r requirements.txt- Start JupyterLab / Notebook:
jupyter labdata/— Toy dataset generator.results/— Output destination.- Notebooks: modeling experiments and processing pipelines.
-
Generate toy dataset
python data\randomize.pyThis creates
data/submissions.csvanddata/outcomes.csv. -
Process the generated dataset
OpenData Processing.ipynbin Jupyter and run all cells (or execute headlessly):jupyter lab # then open the notebook and click "Run All" # OR run headlessly python -m nbconvert --to notebook --execute "Data Processing.ipynb" --inplace
This reads
data/submissions.csvand writesdata/processed_submissions.csv. -
Explore
submission patterns (clustering) or Train / evaluate models (Decision Tree, Random Forest, XGBoost, 1D CNN)
For each model notebook below: open the notebook, run the top "Load data" cells, then run one of the test blocks.
-
Submission Pattern to Targets 4 courses.ipynb(Clustering)- Default settings compute an optimal LP degree
p_opt, interpolate submission fraction profiles, and run clustering (3/4/5 clusters). You can changeMIN_SUBMISSIONS,N_INTERPOLATION_POINTS, andN_CLUSTERSnear the clustering cells. - Plots are saved to
results/(e.g.cluster_histograms(...)).
- Default settings compute an optimal LP degree
-
Model(DT) on Submission Pattern to Targets 4 courses.ipynb(Decision Tree)- Run
Test1 - interpolatedto build interpolated vectors:vectors = get_interpolated_profile(...)thenX, Y = get_XY(...). - Run either the
random foldcell (random splits) orcourse fold listcell (course-level splits) to runCV_DecisionTree(...). - Alternatively run the
Test - 0 filledblock to use zero-filled time bins.
- Run
-
Model(RF) on Submission Pattern to Targets 4 courses.ipynb(Random Forest)- Same workflow as Decision Tree: choose
interpolatedor0 filled, then runCV_RandomForest(...)using therandom foldorcourse foldcells.
- Same workflow as Decision Tree: choose
-
Model(XGB) on Submission Pattern to Targets 4 courses.ipynb(XGBoost)- Same workflow; this notebook also provides a
nan filledvariant for missing bins. - Note: XGBoost uses
missing=np.naninternally; you can run therandom foldorcourse foldcells.
- Same workflow; this notebook also provides a
-
Model(1DCNN) on Submission Pattern to Targets 4 courses.ipynb(1D CNN via Skorch/PyTorch)- This requires
torchandskorch(seerequirements.txt). If you have a GPU, the notebook will use it automatically. - Run the
Test1 - interpolatedorTest - 0 filledblocks to prepareX, Y(the CNN expectsXshaped(n_samples, n_timesteps, 1)). - Run the
random foldorcourse foldcells to runCV_CNN_1D(...). Grid searches can be slow—consider reducingparam_gridormax_epochsfor quick runs.
- This requires
- All model notebooks expect
data/processed_submissions.csvanddata/outcomes.csvto exist and to be formatted as produced byData Processing.ipynb. - If you prefer non-interactive runs, you can execute any notebook headlessly with:
python -m nbconvert --to notebook --execute "<notebook.ipynb>" --inplace- Check
results/for saved figures and adjust notebook variables (top cells) to change output locations or parameters.
This project is released under the MIT License. See LICENSE.
Citation is not ready yet.