Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Submission Pattern to Targets — Public Version

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).

Quickstart (Windows)

  • 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 lab

Repository layout

  • data/ — Toy dataset generator.
  • results/ — Output destination.
  • Notebooks: modeling experiments and processing pipelines.

How to (run order)

  1. Generate toy dataset

    python data\randomize.py

    This creates data/submissions.csv and data/outcomes.csv.

  2. Process the generated dataset
    Open Data Processing.ipynb in 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.csv and writes data/processed_submissions.csv.

  3. Explore
    submission patterns (clustering) or Train / evaluate models (Decision Tree, Random Forest, XGBoost, 1D CNN)

Experiments

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 change MIN_SUBMISSIONS, N_INTERPOLATION_POINTS, and N_CLUSTERS near the clustering cells.
    • Plots are saved to results/ (e.g. cluster_histograms(...)).
  • Model(DT) on Submission Pattern to Targets 4 courses.ipynb (Decision Tree)

    • Run Test1 - interpolated to build interpolated vectors: vectors = get_interpolated_profile(...) then X, Y = get_XY(...).
    • Run either the random fold cell (random splits) or course fold list cell (course-level splits) to run CV_DecisionTree(...).
    • Alternatively run the Test - 0 filled block to use zero-filled time bins.
  • Model(RF) on Submission Pattern to Targets 4 courses.ipynb (Random Forest)

    • Same workflow as Decision Tree: choose interpolated or 0 filled, then run CV_RandomForest(...) using the random fold or course fold cells.
  • Model(XGB) on Submission Pattern to Targets 4 courses.ipynb (XGBoost)

    • Same workflow; this notebook also provides a nan filled variant for missing bins.
    • Note: XGBoost uses missing=np.nan internally; you can run the random fold or course fold cells.
  • Model(1DCNN) on Submission Pattern to Targets 4 courses.ipynb (1D CNN via Skorch/PyTorch)

    • This requires torch and skorch (see requirements.txt). If you have a GPU, the notebook will use it automatically.
    • Run the Test1 - interpolated or Test - 0 filled blocks to prepare X, Y (the CNN expects X shaped (n_samples, n_timesteps, 1)).
    • Run the random fold or course fold cells to run CV_CNN_1D(...). Grid searches can be slow—consider reducing param_grid or max_epochs for quick runs.

Notes and tips

  • All model notebooks expect data/processed_submissions.csv and data/outcomes.csv to exist and to be formatted as produced by Data 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.

License

This project is released under the MIT License. See LICENSE.

How to cite

Citation is not ready yet.

About

srl learner profile

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages