File size: 1,178 Bytes
4d65913 7affe31 9f14291 7affe31 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ---
license: mit
---
# Huaxiang ChaPanda Timeout Model
This repository contains the training and inference code for estimating whether
Fujian Normal University Huaxiang Garden ChaPanda delivery orders may time out
from the order time.
## Data Assumption
`records.csv` in the Dataset repository stores the manually maintained base
records. When both timeout and non-timeout samples are present, retraining uses
`labeled_empirical_bayes`, which is closer to a calibrated probability model. If
only timeout samples are available, the artifact remains a positive-only
time-risk model.
## Train
From the local conda environment:
```powershell
conda activate cbd
python train.py --dataset-dir ..\FJNU-HuaxiangChaPandaTimeoutRecord
```
Or download from Hugging Face:
```powershell
python train.py --download-from-hub
```
The default output is `timeout_model.json`.
## Predict
```powershell
python predict.py "2026-05-24 18:30"
```
The output includes the estimated probability, risk level, model mode, and a
calibration note. When the model mode is `positive_only_time_density`, treat the
number as a relative risk estimate until enough non-timeout samples are collected.
|