# Predicting Exam Outcomes in Ruby: Split Before You Scale: runnable files

5 tests / 19 assertions with Rumale 0.28.1 on Ruby 3.3.2; synthetic 12-row training and 6-row holdout cohorts, no real student prediction validation.

Download all files in this folder before running. The article is at https://oneruby.dev/predicting-student-exam-outcomes-with-machine-learning-in-ruby/.

## Reproduce

Requires Ruby 3.3.2, Bundler 2.7.0 and a C build toolchain for native dependencies. Install into an isolated project path.

```sh
bundle config set --local path vendor/bundle
bundle install
bundle exec ruby test_example.rb
bundle exec ruby example.rb
```

The pinned lock was resolved on arm64 macOS. Other platforms may need their native compiler prerequisites; no Windows/Linux claim is made.

## Files

- [Gemfile](Gemfile)
- [Gemfile.lock](Gemfile.lock)
- [example.rb](example.rb)
- [students.csv](students.csv)
- [test_example.rb](test_example.rb)

## Boundaries

- All rows are synthetic; model results do not support predictions or interventions for real students.
- Two thresholds describe the fixture, not a threshold selected independently of holdout data.
- No calibration, grouped/time-based generalization study or resumable model persistence.
