studentprognose 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- studentprognose-1.1.0/.github/workflows/ci.yml +11 -0
- studentprognose-1.1.0/.github/workflows/pypi-publish.yml +68 -0
- studentprognose-1.1.0/.github/workflows/unit.yml +25 -0
- studentprognose-1.1.0/.gitignore +21 -0
- studentprognose-1.1.0/.pre-commit-config.yaml +18 -0
- studentprognose-1.1.0/.python-version +1 -0
- studentprognose-1.1.0/LICENSE +21 -0
- studentprognose-1.1.0/PKG-INFO +231 -0
- studentprognose-1.1.0/README.md +198 -0
- studentprognose-1.1.0/archive/append_studentcount_and_compute_errors.py +110 -0
- studentprognose-1.1.0/archive/apply_weights_on_different_year.py +276 -0
- studentprognose-1.1.0/archive/calculate_ensemble_weights.py +423 -0
- studentprognose-1.1.0/archive/higher_years/fill_in_ratiofile.py +220 -0
- studentprognose-1.1.0/archive/higher_years/higher_years.py +279 -0
- studentprognose-1.1.0/archive/higher_years/higher_years_othermethod.py +434 -0
- studentprognose-1.1.0/configuration/configuration.json +83 -0
- studentprognose-1.1.0/configuration/ensemble_weights.xlsx +0 -0
- studentprognose-1.1.0/configuration/filtering/base.json +10 -0
- studentprognose-1.1.0/configuration/filtering/fast_test.json +10 -0
- studentprognose-1.1.0/configuration/filtering/test.json +13 -0
- studentprognose-1.1.0/data/input/.gitkeep +0 -0
- studentprognose-1.1.0/data/output/.gitkeep +0 -0
- studentprognose-1.1.0/doc/ActivityDiagram/activity_diagram.png +0 -0
- studentprognose-1.1.0/doc/ActivityDiagram/activity_diagram.svg +57 -0
- studentprognose-1.1.0/doc/ActivityDiagram/activity_diagram_plantuml.txt +49 -0
- studentprognose-1.1.0/doc/ActivityDiagram/activity_diagram_with_legend.png +0 -0
- studentprognose-1.1.0/doc/ClassDiagram/class_diagram.png +0 -0
- studentprognose-1.1.0/doc/ClassDiagram/class_diagram.svg +123 -0
- studentprognose-1.1.0/doc/ClassDiagram/class_diagram_plantuml.txt +97 -0
- studentprognose-1.1.0/doc/ClassDiagramSimple/class_diagram_simple.png +0 -0
- studentprognose-1.1.0/doc/ClassDiagramSimple/class_diagram_simple.svg +62 -0
- studentprognose-1.1.0/doc/ClassDiagramSimple/class_diagram_simple_plantuml.txt +36 -0
- studentprognose-1.1.0/doc/PIPELINE.md +253 -0
- studentprognose-1.1.0/doc/SequenceDiagram/sequence_diagram.png +0 -0
- studentprognose-1.1.0/doc/SequenceDiagram/sequence_diagram.svg +60 -0
- studentprognose-1.1.0/doc/SequenceDiagram/sequence_diagram_plantuml.txt +52 -0
- studentprognose-1.1.0/doc/TECHNICAL_README.md +43 -0
- studentprognose-1.1.0/doc/header.svg +70 -0
- studentprognose-1.1.0/doc/presentation/README.md +31 -0
- studentprognose-1.1.0/doc/presentation/package.json +13 -0
- studentprognose-1.1.0/doc/presentation/public/accuracy_visual.html +50 -0
- studentprognose-1.1.0/doc/presentation/public/chart_boxplot_error.html +29 -0
- studentprognose-1.1.0/doc/presentation/public/chart_confidence_band.html +24 -0
- studentprognose-1.1.0/doc/presentation/public/chart_deadline_effect.html +24 -0
- studentprognose-1.1.0/doc/presentation/public/chart_distance_histogram.html +29 -0
- studentprognose-1.1.0/doc/presentation/public/chart_ensemble_weights_heatmap.html +26 -0
- studentprognose-1.1.0/doc/presentation/public/chart_examentype_bar.html +18 -0
- studentprognose-1.1.0/doc/presentation/public/chart_faculty_treemap.html +23 -0
- studentprognose-1.1.0/doc/presentation/public/chart_herkomst_pie.html +23 -0
- studentprognose-1.1.0/doc/presentation/public/chart_herkomst_trend.html +26 -0
- studentprognose-1.1.0/doc/presentation/public/chart_mae_per_programme.html +20 -0
- studentprognose-1.1.0/doc/presentation/public/chart_model_comparison_radar.html +34 -0
- studentprognose-1.1.0/doc/presentation/public/chart_numerus_fixus.html +23 -0
- studentprognose-1.1.0/doc/presentation/public/chart_pipeline_gantt.html +27 -0
- studentprognose-1.1.0/doc/presentation/public/chart_ratio_scatter.html +25 -0
- studentprognose-1.1.0/doc/presentation/public/chart_residuals.html +24 -0
- studentprognose-1.1.0/doc/presentation/public/chart_sarima_decomposition.html +29 -0
- studentprognose-1.1.0/doc/presentation/public/chart_scatter_pred_vs_actual.html +33 -0
- studentprognose-1.1.0/doc/presentation/public/chart_sunburst.html +24 -0
- studentprognose-1.1.0/doc/presentation/public/chart_waterfall.html +24 -0
- studentprognose-1.1.0/doc/presentation/public/chart_weekly_applicants_area.html +20 -0
- studentprognose-1.1.0/doc/presentation/public/chart_xgb_features.html +19 -0
- studentprognose-1.1.0/doc/presentation/public/chart_xgb_probability.html +32 -0
- studentprognose-1.1.0/doc/presentation/public/chart_xgb_reg_features.html +19 -0
- studentprognose-1.1.0/doc/presentation/public/chart_year_over_year.html +23 -0
- studentprognose-1.1.0/doc/presentation/public/cumulative_visual.html +120 -0
- studentprognose-1.1.0/doc/presentation/public/ensemble_visual.html +70 -0
- studentprognose-1.1.0/doc/presentation/public/individual_visual.html +75 -0
- studentprognose-1.1.0/doc/presentation/public/multiyear_visual.html +60 -0
- studentprognose-1.1.0/doc/presentation/public/programmes_visual.html +58 -0
- studentprognose-1.1.0/doc/presentation/slides.md +421 -0
- studentprognose-1.1.0/main.py +6 -0
- studentprognose-1.1.0/pyproject.toml +67 -0
- studentprognose-1.1.0/scripts/generate_realistic_data.py +721 -0
- studentprognose-1.1.0/src/studentprognose/__init__.py +0 -0
- studentprognose-1.1.0/src/studentprognose/cli.py +141 -0
- studentprognose-1.1.0/src/studentprognose/config.py +11 -0
- studentprognose-1.1.0/src/studentprognose/main.py +175 -0
- studentprognose-1.1.0/src/studentprognose/models/__init__.py +0 -0
- studentprognose-1.1.0/src/studentprognose/models/base.py +14 -0
- studentprognose-1.1.0/src/studentprognose/models/ratio.py +123 -0
- studentprognose-1.1.0/src/studentprognose/models/sarima.py +207 -0
- studentprognose-1.1.0/src/studentprognose/models/xgboost_classifier.py +178 -0
- studentprognose-1.1.0/src/studentprognose/models/xgboost_regressor.py +65 -0
- studentprognose-1.1.0/src/studentprognose/output/__init__.py +0 -0
- studentprognose-1.1.0/src/studentprognose/output/postprocessor.py +413 -0
- studentprognose-1.1.0/src/studentprognose/strategies/__init__.py +58 -0
- studentprognose-1.1.0/src/studentprognose/strategies/base.py +109 -0
- studentprognose-1.1.0/src/studentprognose/strategies/combined.py +170 -0
- studentprognose-1.1.0/src/studentprognose/strategies/cumulative.py +274 -0
- studentprognose-1.1.0/src/studentprognose/strategies/individual.py +271 -0
- studentprognose-1.1.0/src/studentprognose/utils/__init__.py +0 -0
- studentprognose-1.1.0/src/studentprognose/utils/ci_subset.py +106 -0
- studentprognose-1.1.0/src/studentprognose/utils/weeks.py +160 -0
- studentprognose-1.1.0/tests/__init__.py +0 -0
- studentprognose-1.1.0/tests/studentprognose/__init__.py +0 -0
- studentprognose-1.1.0/tests/studentprognose/test_cli.py +57 -0
- studentprognose-1.1.0/uv.lock +950 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Publish Python 🐍 package to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Run tests
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v5
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.12'
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: uv sync --group dev
|
|
25
|
+
|
|
26
|
+
- name: Run tests
|
|
27
|
+
run: uv run pytest
|
|
28
|
+
|
|
29
|
+
build:
|
|
30
|
+
name: Build distribution
|
|
31
|
+
needs: test
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
persist-credentials: false
|
|
38
|
+
|
|
39
|
+
- name: Install uv
|
|
40
|
+
uses: astral-sh/setup-uv@v5
|
|
41
|
+
|
|
42
|
+
- name: Build wheel and sdist
|
|
43
|
+
run: uv build
|
|
44
|
+
|
|
45
|
+
- name: Store distribution packages
|
|
46
|
+
uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: python-package-distributions
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
publish-to-pypi:
|
|
52
|
+
name: Publish to PyPI
|
|
53
|
+
needs: build
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
environment:
|
|
56
|
+
name: pypi
|
|
57
|
+
url: https://pypi.org/project/studentprognose/
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write
|
|
60
|
+
steps:
|
|
61
|
+
- name: Download all the dists
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: python-package-distributions
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Unit tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
test:
|
|
8
|
+
name: Unit tests
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- name: Install uv
|
|
14
|
+
uses: astral-sh/setup-uv@v5
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.12'
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: uv sync --group dev
|
|
23
|
+
|
|
24
|
+
- name: Run unit tests
|
|
25
|
+
run: uv run pytest tests/ -v
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.pyc
|
|
3
|
+
.venv/
|
|
4
|
+
.vscode/
|
|
5
|
+
|
|
6
|
+
#Data files can be ignored
|
|
7
|
+
data/*
|
|
8
|
+
|
|
9
|
+
!data/input
|
|
10
|
+
data/input/*
|
|
11
|
+
!data/input/.gitkeep
|
|
12
|
+
|
|
13
|
+
!data/output
|
|
14
|
+
data/output/*
|
|
15
|
+
!data/output/.gitkeep
|
|
16
|
+
|
|
17
|
+
!data/metadata
|
|
18
|
+
|
|
19
|
+
!data/input_raw
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-yaml
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/psf/black
|
|
10
|
+
rev: 24.8.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: black
|
|
13
|
+
args: [--line-length=99]
|
|
14
|
+
|
|
15
|
+
exclude: |
|
|
16
|
+
(?x)(
|
|
17
|
+
^hooks/
|
|
18
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Radboud Institutional Research
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: studentprognose
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Studentprognose tool voor het voorspellen van eerstejaars instroom in het hoger onderwijs
|
|
5
|
+
Project-URL: Homepage, https://github.com/cedanl/studentprognose
|
|
6
|
+
Project-URL: Repository, https://github.com/cedanl/studentprognose
|
|
7
|
+
Project-URL: Issues, https://github.com/cedanl/studentprognose/issues
|
|
8
|
+
Author-email: CEDA <info@cedanl.nl>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: hoger-onderwijs,instroom,machine-learning,onderwijs,prognose
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Education
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Education
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Requires-Dist: matplotlib>=3.10.0
|
|
22
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
23
|
+
Requires-Dist: pandas>=2.2.3
|
|
24
|
+
Requires-Dist: pillow>=12.2.0
|
|
25
|
+
Requires-Dist: scikit-learn>=1.6.1
|
|
26
|
+
Requires-Dist: scipy>=1.13.0
|
|
27
|
+
Requires-Dist: statsmodels>=0.14.4
|
|
28
|
+
Requires-Dist: tqdm>=4.67.1
|
|
29
|
+
Requires-Dist: xgboost>=2.1.3
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pre-commit>=4.1.0; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
<div align="center">
|
|
35
|
+
<a href="https://github.com/cedanl/studentprognose">
|
|
36
|
+
<img src="doc/header.svg" alt="Studentprognose" style="max-width: 100%;">
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
<h3>Voorspel je studentinstroom maanden vooruit — met je eigen data, op je eigen machine.</h3>
|
|
40
|
+
|
|
41
|
+
<p>
|
|
42
|
+
<a href="https://www.voxweb.nl/nieuws/de-universiteit-heeft-nu-haar-eigen-glazen-bol-nieuw-model-voorspelt-toekomstige-instroom-van-studenten"><img src="https://img.shields.io/badge/Ingezet_door-Radboud_Universiteit-darkred" alt="Radboud Universiteit"></a>
|
|
43
|
+
<a href="https://github.com/cedanl"><img src="https://img.shields.io/badge/Onderhouden_door-CEDA-blue" alt="CEDA"></a>
|
|
44
|
+
<img src="https://badgen.net/github/contributors/cedanl/studentprognose" alt="Contributors">
|
|
45
|
+
<img src="https://img.shields.io/github/license/cedanl/studentprognose" alt="GitHub License">
|
|
46
|
+
<br>
|
|
47
|
+
<a href="#"><img src="https://img.shields.io/badge/Python-≥3.12-3776AB?logo=python&logoColor=white" alt="Python"></a>
|
|
48
|
+
<img src="https://badgen.net/github/last-commit/cedanl/studentprognose" alt="GitHub Last Commit">
|
|
49
|
+
<a href="#"><img src="https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white" alt="Windows"></a>
|
|
50
|
+
<a href="#"><img src="https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=F0F0F0" alt="macOS"></a>
|
|
51
|
+
<a href="#"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" alt="Linux"></a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 📦 Aan de slag
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 1. Installeer uv (zie https://docs.astral.sh/uv/getting-started/installation/)
|
|
62
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
63
|
+
|
|
64
|
+
# 2. Clone de repository
|
|
65
|
+
git clone https://github.com/cedanl/studentprognose.git
|
|
66
|
+
cd studentprognose
|
|
67
|
+
|
|
68
|
+
# 3. Draai het model met demodata
|
|
69
|
+
uv run main.py
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> [!NOTE]
|
|
73
|
+
> Demodata is meegeleverd in `data/input`, zodat je direct kunt starten. Controleer welke jaren en weken beschikbaar zijn — zonder specificatie gebruikt het script de huidige week, wat mogelijk niet werkt met de meegeleverde data.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🗃️ Studielink Data
|
|
78
|
+
|
|
79
|
+
> [!IMPORTANT]
|
|
80
|
+
> Dit model werkt met **Studielink-telbestanden**. Je hebt deze data nodig om voorspellingen te maken voor jouw instelling. Demodata is meegeleverd zodat je het model eerst kunt uitproberen.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Waarom dit model?
|
|
85
|
+
|
|
86
|
+
Dit model is gebouwd voor **data-analisten bij Nederlandse onderwijsinstellingen** die werken met Studielink-data. Je hebt geen machine learning-expertise nodig.
|
|
87
|
+
|
|
88
|
+
| | |
|
|
89
|
+
|---|---|
|
|
90
|
+
| **Bring Your Own Data** | Je levert je eigen data aan — er wordt niets extern gedeeld |
|
|
91
|
+
| **Privacy-vriendelijk** | Draait volledig lokaal op je eigen machine |
|
|
92
|
+
| **Open source** | Transparant, aanpasbaar en gratis te gebruiken |
|
|
93
|
+
| **Demo data inbegrepen** | Direct uitproberen zonder eigen data — demobestanden zitten in `data/input` |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## ✨ Gebruik
|
|
98
|
+
|
|
99
|
+
### Jaren en weken
|
|
100
|
+
|
|
101
|
+
Specificeer jaar en week met `-y` en `-w`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
uv run main.py -w 6 -y 2024
|
|
105
|
+
uv run main.py -W 1 2 3 -Y 2024
|
|
106
|
+
uv run main.py -year 2023 2024
|
|
107
|
+
uv run main.py -week 40 41
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Gebruik slicing voor een reeks weken:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
uv run main.py -w 10 : 20 -y 2023
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Datasets
|
|
117
|
+
|
|
118
|
+
Er zijn twee datasets beschikbaar: **individual** (per student) en **cumulative** (geaggregeerd per opleiding/herkomst/jaar/week). Standaard worden beide gebruikt.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uv run main.py -d individual
|
|
122
|
+
uv run main.py -D cumulative
|
|
123
|
+
uv run main.py -dataset both
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Configuratie
|
|
127
|
+
|
|
128
|
+
Het standaard configuratiebestand is `configuration/configuration.json`. Dit kan worden overschreven:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
uv run main.py -c pad/naar/configuration.json
|
|
132
|
+
uv run main.py -configuration langer/pad/naar/config.json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Uitgebreid voorbeeld
|
|
136
|
+
|
|
137
|
+
Voorspel eerstejaars voor 2023 en 2024, weken 10 t/m 20, met beide datasets:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
uv run main.py -y 2023 2024 -w 10 : 20 -d b
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Voorspel eerstejaars voor collegejaar 2025/2026, week 5, alleen cumulatief:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
uv run main.py -y 2025 -w 5 -d c
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Syntax overzicht
|
|
150
|
+
|
|
151
|
+
| Instelling | Korte notatie | Lange notatie | Opties |
|
|
152
|
+
|-------------------------|----------------|------------------|---------------------------------------------|
|
|
153
|
+
| Voorspellingsjaren | `-y` of `-Y` | `-year` | Eén of meer jaren, bijv. `2023 2024` |
|
|
154
|
+
| Voorspellingsweken | `-w` of `-W` | `-week` | Eén of meer weken, bijv. `10 11 12` |
|
|
155
|
+
| Slicing | | | Gebruik `:` voor reeksen, bijv. `10 : 20` |
|
|
156
|
+
| Dataset | `-d` of `-D` | `-dataset` | `i`/`individual`, `c`/`cumulative`, `b`/`both` |
|
|
157
|
+
| Configuratie | `-c` of `-C` | `-configuration` | Pad naar configuratiebestand |
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 📁 Beschrijving van bestanden
|
|
161
|
+
|
|
162
|
+
### Input
|
|
163
|
+
|
|
164
|
+
| Bestand | Beschrijving |
|
|
165
|
+
|---------|-------------|
|
|
166
|
+
| **individual** | Individuele (voor)aanmeldingen per student. Wordt gebruikt voor de SARIMA_individual voorspelling. |
|
|
167
|
+
| **cumulative** | Aantal aanmeldingen per opleiding, herkomst, jaar, week en herinschrijving/hogerejaars. Wordt gebruikt voor de SARIMA_cumulative voorspelling. Verkregen via Studielink. |
|
|
168
|
+
| **latest** | Per opleiding, herkomst, jaar en week: aanmeldingen, voorspellingen en foutwaarden (MAE/MAPE). Wordt gebruikt voor volume- en hogerjaarsvoorspellingen. |
|
|
169
|
+
| **student_count_first-years** | Werkelijk aantal eerstejaars studenten per jaar, opleiding en herkomst. |
|
|
170
|
+
| **student_count_higher-years** | Werkelijk aantal hogerjaars studenten per jaar, opleiding en herkomst. |
|
|
171
|
+
| **student_volume** | Werkelijk totaal aantal studenten (eerstejaars + hogerjaars) per jaar, opleiding en herkomst. |
|
|
172
|
+
| **weighted_ensemble** | Gewichten per model voor de ensemble-voorspelling. |
|
|
173
|
+
|
|
174
|
+
### Output
|
|
175
|
+
|
|
176
|
+
| Bestand | Beschrijving |
|
|
177
|
+
|---------|-------------|
|
|
178
|
+
| **output_prelim.xlsx** | Voorlopige output met alle voorspellingen van de huidige run. |
|
|
179
|
+
| **output_first-years.xlsx** | Volledige output met voorspellingen voor eerstejaars studenten. |
|
|
180
|
+
| **output_higher-years.xlsx** | Volledige output met voorspellingen voor hogerjaars studenten. |
|
|
181
|
+
| **output_volume.xlsx** | Volledige output met volume-voorspellingen (totaal). |
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 🏗️ Architectuur
|
|
186
|
+
|
|
187
|
+
### Pipeline executievolgorde
|
|
188
|
+
|
|
189
|
+
**Gedeelde stappen (alle modi):**
|
|
190
|
+
|
|
191
|
+
| Stap | Fase | Bestand |
|
|
192
|
+
|------|------|---------|
|
|
193
|
+
| 1 | CLI parsing | `cli.py` |
|
|
194
|
+
| 2 | ETL (skip met `--noetl`) | `etl` |
|
|
195
|
+
| 3 | Configuratie laden | `config.py` |
|
|
196
|
+
| 4 | Data laden | `loader` → `preprocessing/add_zero_weeks` |
|
|
197
|
+
| 5 | CI subset (indien `--ci`) | `utils/ci_subset` |
|
|
198
|
+
|
|
199
|
+
**Modus-specifieke stappen:**
|
|
200
|
+
|
|
201
|
+
| Stap | Fase | Individual (`-d i`) | Cumulative (`-d c`) | Both (`-d b`) |
|
|
202
|
+
|------|------|---------------------|---------------------|---------------|
|
|
203
|
+
| 6 | Preprocessing | `strategies/individual` | `strategies/cumulative` | individual → cumulative |
|
|
204
|
+
| 7 | Filtering | `strategies/base` | `strategies/base` | `strategies/base` |
|
|
205
|
+
| 8 | Classificatie | `xgboost_classifier` | — | `xgboost_classifier` |
|
|
206
|
+
| 9 | Transformatie | `transforms` | — | `transforms` |
|
|
207
|
+
| 10 | SARIMA | `sarima` (individual) | `sarima` → `transforms` | `sarima` (both) |
|
|
208
|
+
| 11 | XGBoost regressor | — | `xgboost_regressor` | `xgboost_regressor` |
|
|
209
|
+
| 12 | Ratio model | — | `ratio` | `ratio` |
|
|
210
|
+
| 13 | Postprocessing + Opslaan | `postprocessor` | `postprocessor` | `postprocessor` |
|
|
211
|
+
|
|
212
|
+
Zie de [Technische README](doc/TECHNICAL_README.md) voor meer details over de architectuur.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 🤝 Bijdragen
|
|
217
|
+
|
|
218
|
+
Dit project wordt actief onderhouden door [CEDA](https://github.com/cedanl). Wil je bijdragen of meedenken? Sluit je aan bij de [werkgroep](https://edu.nl/6d69d).
|
|
219
|
+
|
|
220
|
+
## 🆘 Ondersteuning
|
|
221
|
+
|
|
222
|
+
Voor vragen of problemen:
|
|
223
|
+
- **GitHub Issues**: [Probleem melden](https://github.com/cedanl/studentprognose/issues)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
<div align="center">
|
|
228
|
+
<sub>Gebouwd met ❤️ door de <a href="https://github.com/cedanl">CEDANL</a> community</sub>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<a href="https://github.com/cedanl/studentprognose">
|
|
3
|
+
<img src="doc/header.svg" alt="Studentprognose" style="max-width: 100%;">
|
|
4
|
+
</a>
|
|
5
|
+
|
|
6
|
+
<h3>Voorspel je studentinstroom maanden vooruit — met je eigen data, op je eigen machine.</h3>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<a href="https://www.voxweb.nl/nieuws/de-universiteit-heeft-nu-haar-eigen-glazen-bol-nieuw-model-voorspelt-toekomstige-instroom-van-studenten"><img src="https://img.shields.io/badge/Ingezet_door-Radboud_Universiteit-darkred" alt="Radboud Universiteit"></a>
|
|
10
|
+
<a href="https://github.com/cedanl"><img src="https://img.shields.io/badge/Onderhouden_door-CEDA-blue" alt="CEDA"></a>
|
|
11
|
+
<img src="https://badgen.net/github/contributors/cedanl/studentprognose" alt="Contributors">
|
|
12
|
+
<img src="https://img.shields.io/github/license/cedanl/studentprognose" alt="GitHub License">
|
|
13
|
+
<br>
|
|
14
|
+
<a href="#"><img src="https://img.shields.io/badge/Python-≥3.12-3776AB?logo=python&logoColor=white" alt="Python"></a>
|
|
15
|
+
<img src="https://badgen.net/github/last-commit/cedanl/studentprognose" alt="GitHub Last Commit">
|
|
16
|
+
<a href="#"><img src="https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white" alt="Windows"></a>
|
|
17
|
+
<a href="#"><img src="https://img.shields.io/badge/macOS-000000?logo=apple&logoColor=F0F0F0" alt="macOS"></a>
|
|
18
|
+
<a href="#"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" alt="Linux"></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📦 Aan de slag
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# 1. Installeer uv (zie https://docs.astral.sh/uv/getting-started/installation/)
|
|
29
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
30
|
+
|
|
31
|
+
# 2. Clone de repository
|
|
32
|
+
git clone https://github.com/cedanl/studentprognose.git
|
|
33
|
+
cd studentprognose
|
|
34
|
+
|
|
35
|
+
# 3. Draai het model met demodata
|
|
36
|
+
uv run main.py
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> [!NOTE]
|
|
40
|
+
> Demodata is meegeleverd in `data/input`, zodat je direct kunt starten. Controleer welke jaren en weken beschikbaar zijn — zonder specificatie gebruikt het script de huidige week, wat mogelijk niet werkt met de meegeleverde data.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🗃️ Studielink Data
|
|
45
|
+
|
|
46
|
+
> [!IMPORTANT]
|
|
47
|
+
> Dit model werkt met **Studielink-telbestanden**. Je hebt deze data nodig om voorspellingen te maken voor jouw instelling. Demodata is meegeleverd zodat je het model eerst kunt uitproberen.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Waarom dit model?
|
|
52
|
+
|
|
53
|
+
Dit model is gebouwd voor **data-analisten bij Nederlandse onderwijsinstellingen** die werken met Studielink-data. Je hebt geen machine learning-expertise nodig.
|
|
54
|
+
|
|
55
|
+
| | |
|
|
56
|
+
|---|---|
|
|
57
|
+
| **Bring Your Own Data** | Je levert je eigen data aan — er wordt niets extern gedeeld |
|
|
58
|
+
| **Privacy-vriendelijk** | Draait volledig lokaal op je eigen machine |
|
|
59
|
+
| **Open source** | Transparant, aanpasbaar en gratis te gebruiken |
|
|
60
|
+
| **Demo data inbegrepen** | Direct uitproberen zonder eigen data — demobestanden zitten in `data/input` |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ✨ Gebruik
|
|
65
|
+
|
|
66
|
+
### Jaren en weken
|
|
67
|
+
|
|
68
|
+
Specificeer jaar en week met `-y` en `-w`:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv run main.py -w 6 -y 2024
|
|
72
|
+
uv run main.py -W 1 2 3 -Y 2024
|
|
73
|
+
uv run main.py -year 2023 2024
|
|
74
|
+
uv run main.py -week 40 41
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Gebruik slicing voor een reeks weken:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
uv run main.py -w 10 : 20 -y 2023
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Datasets
|
|
84
|
+
|
|
85
|
+
Er zijn twee datasets beschikbaar: **individual** (per student) en **cumulative** (geaggregeerd per opleiding/herkomst/jaar/week). Standaard worden beide gebruikt.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
uv run main.py -d individual
|
|
89
|
+
uv run main.py -D cumulative
|
|
90
|
+
uv run main.py -dataset both
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Configuratie
|
|
94
|
+
|
|
95
|
+
Het standaard configuratiebestand is `configuration/configuration.json`. Dit kan worden overschreven:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
uv run main.py -c pad/naar/configuration.json
|
|
99
|
+
uv run main.py -configuration langer/pad/naar/config.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Uitgebreid voorbeeld
|
|
103
|
+
|
|
104
|
+
Voorspel eerstejaars voor 2023 en 2024, weken 10 t/m 20, met beide datasets:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
uv run main.py -y 2023 2024 -w 10 : 20 -d b
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Voorspel eerstejaars voor collegejaar 2025/2026, week 5, alleen cumulatief:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
uv run main.py -y 2025 -w 5 -d c
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Syntax overzicht
|
|
117
|
+
|
|
118
|
+
| Instelling | Korte notatie | Lange notatie | Opties |
|
|
119
|
+
|-------------------------|----------------|------------------|---------------------------------------------|
|
|
120
|
+
| Voorspellingsjaren | `-y` of `-Y` | `-year` | Eén of meer jaren, bijv. `2023 2024` |
|
|
121
|
+
| Voorspellingsweken | `-w` of `-W` | `-week` | Eén of meer weken, bijv. `10 11 12` |
|
|
122
|
+
| Slicing | | | Gebruik `:` voor reeksen, bijv. `10 : 20` |
|
|
123
|
+
| Dataset | `-d` of `-D` | `-dataset` | `i`/`individual`, `c`/`cumulative`, `b`/`both` |
|
|
124
|
+
| Configuratie | `-c` of `-C` | `-configuration` | Pad naar configuratiebestand |
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 📁 Beschrijving van bestanden
|
|
128
|
+
|
|
129
|
+
### Input
|
|
130
|
+
|
|
131
|
+
| Bestand | Beschrijving |
|
|
132
|
+
|---------|-------------|
|
|
133
|
+
| **individual** | Individuele (voor)aanmeldingen per student. Wordt gebruikt voor de SARIMA_individual voorspelling. |
|
|
134
|
+
| **cumulative** | Aantal aanmeldingen per opleiding, herkomst, jaar, week en herinschrijving/hogerejaars. Wordt gebruikt voor de SARIMA_cumulative voorspelling. Verkregen via Studielink. |
|
|
135
|
+
| **latest** | Per opleiding, herkomst, jaar en week: aanmeldingen, voorspellingen en foutwaarden (MAE/MAPE). Wordt gebruikt voor volume- en hogerjaarsvoorspellingen. |
|
|
136
|
+
| **student_count_first-years** | Werkelijk aantal eerstejaars studenten per jaar, opleiding en herkomst. |
|
|
137
|
+
| **student_count_higher-years** | Werkelijk aantal hogerjaars studenten per jaar, opleiding en herkomst. |
|
|
138
|
+
| **student_volume** | Werkelijk totaal aantal studenten (eerstejaars + hogerjaars) per jaar, opleiding en herkomst. |
|
|
139
|
+
| **weighted_ensemble** | Gewichten per model voor de ensemble-voorspelling. |
|
|
140
|
+
|
|
141
|
+
### Output
|
|
142
|
+
|
|
143
|
+
| Bestand | Beschrijving |
|
|
144
|
+
|---------|-------------|
|
|
145
|
+
| **output_prelim.xlsx** | Voorlopige output met alle voorspellingen van de huidige run. |
|
|
146
|
+
| **output_first-years.xlsx** | Volledige output met voorspellingen voor eerstejaars studenten. |
|
|
147
|
+
| **output_higher-years.xlsx** | Volledige output met voorspellingen voor hogerjaars studenten. |
|
|
148
|
+
| **output_volume.xlsx** | Volledige output met volume-voorspellingen (totaal). |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 🏗️ Architectuur
|
|
153
|
+
|
|
154
|
+
### Pipeline executievolgorde
|
|
155
|
+
|
|
156
|
+
**Gedeelde stappen (alle modi):**
|
|
157
|
+
|
|
158
|
+
| Stap | Fase | Bestand |
|
|
159
|
+
|------|------|---------|
|
|
160
|
+
| 1 | CLI parsing | `cli.py` |
|
|
161
|
+
| 2 | ETL (skip met `--noetl`) | `etl` |
|
|
162
|
+
| 3 | Configuratie laden | `config.py` |
|
|
163
|
+
| 4 | Data laden | `loader` → `preprocessing/add_zero_weeks` |
|
|
164
|
+
| 5 | CI subset (indien `--ci`) | `utils/ci_subset` |
|
|
165
|
+
|
|
166
|
+
**Modus-specifieke stappen:**
|
|
167
|
+
|
|
168
|
+
| Stap | Fase | Individual (`-d i`) | Cumulative (`-d c`) | Both (`-d b`) |
|
|
169
|
+
|------|------|---------------------|---------------------|---------------|
|
|
170
|
+
| 6 | Preprocessing | `strategies/individual` | `strategies/cumulative` | individual → cumulative |
|
|
171
|
+
| 7 | Filtering | `strategies/base` | `strategies/base` | `strategies/base` |
|
|
172
|
+
| 8 | Classificatie | `xgboost_classifier` | — | `xgboost_classifier` |
|
|
173
|
+
| 9 | Transformatie | `transforms` | — | `transforms` |
|
|
174
|
+
| 10 | SARIMA | `sarima` (individual) | `sarima` → `transforms` | `sarima` (both) |
|
|
175
|
+
| 11 | XGBoost regressor | — | `xgboost_regressor` | `xgboost_regressor` |
|
|
176
|
+
| 12 | Ratio model | — | `ratio` | `ratio` |
|
|
177
|
+
| 13 | Postprocessing + Opslaan | `postprocessor` | `postprocessor` | `postprocessor` |
|
|
178
|
+
|
|
179
|
+
Zie de [Technische README](doc/TECHNICAL_README.md) voor meer details over de architectuur.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 🤝 Bijdragen
|
|
184
|
+
|
|
185
|
+
Dit project wordt actief onderhouden door [CEDA](https://github.com/cedanl). Wil je bijdragen of meedenken? Sluit je aan bij de [werkgroep](https://edu.nl/6d69d).
|
|
186
|
+
|
|
187
|
+
## 🆘 Ondersteuning
|
|
188
|
+
|
|
189
|
+
Voor vragen of problemen:
|
|
190
|
+
- **GitHub Issues**: [Probleem melden](https://github.com/cedanl/studentprognose/issues)
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
<div align="center">
|
|
195
|
+
<sub>Gebouwd met ❤️ door de <a href="https://github.com/cedanl">CEDANL</a> community</sub>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
|