Haicaji
Retrain model from records csv
9f14291
|
Raw History Blame Contribute Delete
1.18 kB
metadata
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:

conda activate cbd
python train.py --dataset-dir ..\FJNU-HuaxiangChaPandaTimeoutRecord

Or download from Hugging Face:

python train.py --download-from-hub

The default output is timeout_model.json.

Predict

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.