Domain library for student dropout prediction: data preparation, ranking, and evaluation
Project description
student-signal
Domain library for student dropout prediction. Prepares student data, trains sklearn-compatible models, and ranks students by predicted dropout probability using the invitation rule methodology (Eegdeman, 2022).
Installation
Requires Python 3.13+ and uv.
git clone https://github.com/cedanl/student-signal.git
cd student-signal
uv sync
Usage
The library exposes three entry points: prepare(), rank(), and evaluate().
import pandas as pd
from student_signal.pipeline import prepare, rank, evaluate
train_df = pd.read_csv("data/01-raw/demo/synth_data_train.csv", sep="\t")
pred_df = pd.read_csv("data/01-raw/demo/synth_data_pred.csv", sep="\t")
# 1. Clean and transform
prepared = prepare(train_df, pred_df, target_col="Dropout", id_col="Studentnummer")
# 2. Train your model (any sklearn-compatible estimator)
from sklearn.ensemble import RandomForestRegressor
model = RandomForestRegressor(random_state=42)
model.fit(prepared.X_train, prepared.y_train)
# 3. Rank students by dropout risk
ranking = rank(model, prepared)
# 4. Evaluate with stoplight methodology
results = evaluate({"Random Forest": (model, False)}, prepared, invite_pct=20)
rank() returns a DataFrame with columns ranking, Studentnummer, and voorspelling, sorted highest risk first.
evaluate() returns precision/recall metrics at multiple invitation thresholds with a traffic light status (Betrouwbaar / Gebruik met voorzichtigheid / Niet bruikbaar).
Development
Open in devcontainer or run locally:
uv sync
uv run pytest # run tests
uv run ruff check src # lint
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file student_signal-0.1.0.tar.gz.
File metadata
- Download URL: student_signal-0.1.0.tar.gz
- Upload date:
- Size: 61.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8155eef570581291e4745b747842e49d7488d7ad9f4b15c6e19667452d08ec1f
|
|
| MD5 |
0b55b4077bee369f12060969569993d5
|
|
| BLAKE2b-256 |
3126eca5fec77272ec2897540a320195fdfc94b4e145b1b8150fb3aefc166740
|
Provenance
The following attestation bundles were made for student_signal-0.1.0.tar.gz:
Publisher:
publish.yml on cedanl/student-signal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
student_signal-0.1.0.tar.gz -
Subject digest:
8155eef570581291e4745b747842e49d7488d7ad9f4b15c6e19667452d08ec1f - Sigstore transparency entry: 1285988578
- Sigstore integration time:
-
Permalink:
cedanl/student-signal@ab0b0477d774abe03750552616217096e8859d38 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cedanl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab0b0477d774abe03750552616217096e8859d38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file student_signal-0.1.0-py3-none-any.whl.
File metadata
- Download URL: student_signal-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce5e9afaec54df86558afbb386520e5ff9fe8c3a3a5bf0af3f9a8b228d6dad76
|
|
| MD5 |
bbe85580637736c84fcc30f7ef9219c4
|
|
| BLAKE2b-256 |
38db2a3b93c28316f62f6af17e7f965bd211099029d208c5258cce16ffb6bd87
|
Provenance
The following attestation bundles were made for student_signal-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on cedanl/student-signal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
student_signal-0.1.0-py3-none-any.whl -
Subject digest:
ce5e9afaec54df86558afbb386520e5ff9fe8c3a3a5bf0af3f9a8b228d6dad76 - Sigstore transparency entry: 1285988739
- Sigstore integration time:
-
Permalink:
cedanl/student-signal@ab0b0477d774abe03750552616217096e8859d38 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cedanl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab0b0477d774abe03750552616217096e8859d38 -
Trigger Event:
push
-
Statement type: