Views
No views yet
© State of Queensland (Department of Transport and Main Roads) 2026. Licensed CC-BY 4.0. Source: data.qld.gov.au, dataset 'Crash data from Queensland roads', version rqC45037 (2025-06), retrieved 2026-04-30.
1from huggingface_hub import hf_hub_download
2import joblib, lightgbm as lgb
3
4REPO = "Mattysmittttt/crashrisk-qld-fatal"
5booster = lgb.Booster(model_file=hf_hub_download(REPO, "model.txt"))
6pre = joblib.load(hf_hub_download(REPO, "preprocessor.joblib"))
7# pre.transform(X) → booster.predict(...) → P(fatal)binary log-loss (no scale_pos_weight — at ~50× it
caused early stopping at iteration 1; imbalance is handled at
threshold-selection time via the threshold sweep instead).1{
2 "num_leaves": 83,
3 "learning_rate": 0.05082341959721458,
4 "feature_fraction": 0.6563696899899051,
5 "bagging_fraction": 0.9208787923016158,
6 "bagging_freq": 0,
7 "min_data_in_leaf": 480,
8 "lambda_l1": 0.08916674715636552,
9 "lambda_l2": 6.143857495033091e-07
10}threshold_table.csv.| threshold | precision | recall | f1 |
|---|---|---|---|
| 0.006 | 0.019 | 1.000 | 0.037 |
| 0.007 | 0.020 | 0.996 | 0.040 |
| 0.007 | 0.021 | 0.993 | 0.042 |
| 0.007 | 0.022 | 0.989 | 0.043 |
| 0.007 | 0.023 | 0.989 | 0.045 |
| 0.008 | 0.024 | 0.985 | 0.047 |
| 0.008 | 0.025 | 0.982 | 0.048 |
| 0.008 | 0.025 | 0.974 | 0.050 |
| 0.008 | 0.026 | 0.974 | 0.051 |
| 0.008 | 0.027 | 0.974 | 0.053 |
| 0.008 | 0.028 | 0.974 | 0.054 |
| 0.009 | 0.028 | 0.963 | 0.055 |
| 0.009 | 0.029 | 0.960 | 0.056 |
| 0.009 | 0.030 | 0.956 | 0.058 |
| 0.009 | 0.030 | 0.941 | 0.059 |
| 0.010 | 0.031 | 0.930 | 0.060 |
| 0.010 | 0.032 | 0.927 | 0.061 |
| 0.010 | 0.032 | 0.916 | 0.062 |
| 0.010 | 0.033 | 0.912 | 0.064 |
| 0.011 | 0.034 | 0.901 | 0.065 |
| 0.011 | 0.035 | 0.890 | 0.067 |
| 0.011 | 0.036 | 0.886 | 0.069 |
| 0.012 | 0.037 | 0.875 | 0.071 |
| 0.012 | 0.037 | 0.850 | 0.071 |
| 0.013 | 0.038 | 0.839 | 0.073 |
| 0.013 | 0.040 | 0.835 | 0.076 |
| 0.014 | 0.041 | 0.821 | 0.077 |
| 0.014 | 0.041 | 0.799 | 0.078 |
| 0.015 | 0.042 | 0.777 | 0.080 |
| 0.016 | 0.043 | 0.747 | 0.080 |
| 0.016 | 0.044 | 0.736 | 0.083 |
| 0.017 | 0.044 | 0.689 | 0.082 |
| 0.018 | 0.044 | 0.656 | 0.082 |
| 0.020 | 0.045 | 0.637 | 0.085 |
| 0.021 | 0.048 | 0.630 | 0.089 |
| 0.022 | 0.049 | 0.597 | 0.090 |
| 0.024 | 0.050 | 0.575 | 0.093 |
| 0.026 | 0.051 | 0.538 | 0.093 |
| 0.028 | 0.054 | 0.516 | 0.097 |
| 0.030 | 0.058 | 0.509 | 0.104 |
| 0.033 | 0.060 | 0.473 | 0.106 |
| 0.036 | 0.064 | 0.447 | 0.111 |
| 0.039 | 0.066 | 0.403 | 0.113 |
| 0.044 | 0.070 | 0.370 | 0.118 |
| 0.049 | 0.077 | 0.337 | 0.125 |
| 0.056 | 0.085 | 0.297 | 0.132 |
| 0.067 | 0.092 | 0.242 | 0.133 |
| 0.083 | 0.088 | 0.154 | 0.112 |
| 0.111 | 0.117 | 0.103 | 0.109 |
| 1.000 | 1.000 | 0.000 | 0.000 |
loc_suburb (gain = 28660)count_unit_car (gain = 5619)crash_speed_limit (gain = 5061)loc_abs_statistical_area_2 (gain = 4840)loc_post_code (gain = 4436)count_unit_pedestrian (gain = 2189)count_unit_motorcycle_moped (gain = 1875)crash_hour (gain = 1678)count_unit_truck (gain = 1453)crash_year (gain = 1014)loc_state_electorate (gain = 975)crash_lighting_condition_daylight (gain = 878)crash_latitude (gain = 748)loc_abs_statistical_area_3 (gain = 619)crash_longitude (gain = 608)crash_road_horiz_align_straight (gain = 601)crash_roadway_feature_no roadway feature (gain = 554)loc_local_government_area (gain = 513)crash_road_horiz_align_curved - view open (gain = 471)crash_lighting_condition_darkness - not lighted (gain = 400)reports/shap_fatal/ in the source repository for global and local
SHAP plots. The same set of physical drivers (speed_limit, lighting,
surface, roadway_feature) consistently dominates, which is the
expected sanity-check signal.reports/maps/model_lga_risk_surface.png (and the interactive HTML
in the same folder) for a per-LGA map of mean P(fatal) under a fixed
conditions grid.@software{crashrisk_qld_fatal_2026,
title = {CrashRisk-QLD fatal binary classifier},
author = {Mattysmittttt},
year = {2026},
url = {https://huggingface.co/Mattysmittttt/crashrisk-qld-fatal},
note = {Trained on Mattysmittttt/qld-traffic-crashes-clean; source data CC-BY 4.0 © State of Queensland (Department of Transport and Main Roads).}
}