# The prediction using the wrong class

A trained classifier's probability is presented as incident risk, but its
serving configuration selects the wrong class. Inspect the model's actual
class order and correct the selected label.

## Before you begin

Use Bash and Python 3.11 or later on a disposable machine. Create a virtual
environment and install the pinned library:

```sh
LAB_VENV="$(mktemp -d)"
python3 -m venv "$LAB_VENV"
. "$LAB_VENV/bin/activate"
python -m pip install -r requirements.txt
```

The lab fits a real scikit-learn logistic regression on fixed synthetic data
each time it runs. It does not deploy a service, load a model artifact or use
real telemetry. This toy classifier is not a validated production model.

```sh
./setup.sh
./lab.sh inspect
./lab.sh score 9
```

Inspect `training.csv` and `inference.json`. Select the correct positive label
without changing the data or model code, then run:

```sh
./verify.sh
./teardown.sh
```

The verifier checks unseen samples and the original training data. Teardown
creates or deletes no service or cloud resources; deactivate and remove the
separate temporary virtual environment when finished.
