# Implementing the Rasch Model in Python: Fix the Scale Before Fitting: runnable files

7 CPU tests of a penalized joint Rasch estimator with NumPy 2.2.6 and SciPy 1.15.3; no validated assessment or real learner data.

Download all files in this folder before running. The article is at https://oneruby.dev/understanding-and-implementing-the-rasch-model-with-python/.

## Reproduce

Tested with Python 3.11.5 on arm64 macOS. Use an isolated environment; requirements.txt pins direct dependencies and requirements.lock records the tested dependency closure for this platform.

```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.lock
.venv/bin/python -B -m unittest -v test_example.py
.venv/bin/python -B example.py
```

## Files

- [requirements.lock](requirements.lock)

- [example.py](example.py)
- [requirements.txt](requirements.txt)
- [test_example.py](test_example.py)

## Boundaries

- Penalized joint estimation with fixed discrimination and a zero-mean item constraint; not conditional or unpenalized maximum likelihood.
- Penalty=1 is an experiment choice, not calibrated assessment guidance.
- No uncertainty, model-fit, dimensionality, fairness or real assessment validation; disconnected designs are not detected.
