Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

student_signal-0.1.0.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

student_signal-0.1.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

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

Hashes for student_signal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8155eef570581291e4745b747842e49d7488d7ad9f4b15c6e19667452d08ec1f
MD5 0b55b4077bee369f12060969569993d5
BLAKE2b-256 3126eca5fec77272ec2897540a320195fdfc94b4e145b1b8150fb3aefc166740

See more details on using hashes here.

Provenance

The following attestation bundles were made for student_signal-0.1.0.tar.gz:

Publisher: publish.yml on cedanl/student-signal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for student_signal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5e9afaec54df86558afbb386520e5ff9fe8c3a3a5bf0af3f9a8b228d6dad76
MD5 bbe85580637736c84fcc30f7ef9219c4
BLAKE2b-256 38db2a3b93c28316f62f6af17e7f965bd211099029d208c5258cce16ffb6bd87

See more details on using hashes here.

Provenance

The following attestation bundles were made for student_signal-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cedanl/student-signal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page