return-risk predicts, at checkout time, whether an order is likely to be
returned. It pairs a feature catalog with a binary classifier so CX can flag
high-risk orders before they ship.
Once you have the repo, run this from the project root (it assumes the dependencies at the bottom are already installed):
uv sync
make check # verify your environment is ready
make trainuv sync creates the virtualenv and installs dependencies. make check
confirms the stack imports (and tells you to install libomp if it doesn't).
make train trains and evaluates the model. The data CSVs in data/ are
committed — you don't need to generate them.
make train # train + evaluate
make eval # evaluate only (no retrain)
make test # run pytest
make lint # ruff checkmodels/return-risk/MODEL_CARD.md— problem statement, eval protocol, and current baseline. Read this first.docs/CONTRIBUTING.md— feature, eval, and review standards.feature_catalog/— feature implementations, registry, and colocated tests.models/return-risk/feature-configs/— per-model feature selection.models/return-risk/src/— training and prediction code.data/— committed seed CSVs (orders,order_items,returns,support_contacts).
Claude Code, Cursor, Codex, etc. — bring whatever you're comfortable with.
This repo is owned by the Extend org, so you can't push branches directly to it. Instead, submit via a fork:
- Fork this repo to your own GitHub account (the "Fork" button, top-right on GitHub). With the
ghCLI:gh repo fork helloextend/poc-machine-learning-coding-challenge --clone. - Do your work on a branch in your fork.
- Push your branch to your fork.
- Open a Pull Request targeting
helloextend/poc-machine-learning-coding-challenge:main. With theghCLI:gh pr create --repo helloextend/poc-machine-learning-coding-challenge --base main --head <your-github-username>:<your-branch>.
The PR will appear in this repo's Pull Requests tab. An Extend team member will review it there.
You'll need the following installed before you get started:
- Python 3.12 — pinned via
.python-version;uvauto-fetches it if you don't have it (python.org/downloads). uv— Python package/environment manager (install guide).make— on macOS runxcode-select --install; on Debian/Ubuntusudo apt install build-essential; see GNU make otherwise.libomp(macOS only) — required by XGBoost's runtime; without it the import fails. Install withbrew install libomp.git.