Spaces:
Running
Download README.md from bitsnaps/dz-phone-value: direct link, hf CLI and curl.
- Browser
- Download file 2.66 kB
-
https://huggingface.co/spaces/bitsnaps/dz-phone-value/resolve/main/README.md
- Command line
-
hf download hf://spaces/bitsnaps/dz-phone-value/README.md
-
curl -L -o README.md https://huggingface.co/spaces/bitsnaps/dz-phone-value/resolve/main/README.md
title: DZ Phone Value — Smartphone Price Estimator
tags:
- tabular-data
- xgboost
- onnx
- pricing
- algeria
emoji: 📱
colorFrom: indigo
colorTo: blue
sdk: static
pinned: false
DZ Phone Value — Smartphone Price Estimator
100% client-side smartphone price estimation for the Algerian phone market (new & second-hand). The XGBoost model runs directly in your browser via ONNX WebAssembly — no backend, no API calls, no data leaves your machine.
How it works
- ONNX Runtime Web loads the 1.4 MB model via WebAssembly
- You set phone attributes (brand, tier, storage, RAM, condition, battery, region, …)
- Feature engineering + inference happen entirely in JavaScript — 48 features → 3 gradient-boosted ensembles (point / P10 / P90)
- Price estimate + an 80% conformal band appear instantly
Model
| Metric | Value |
|---|---|
| MAE (time-split test) | 33,053 DZD |
| R² (price) | 0.607 |
| Median APE | 22.5% |
| Signed bias | +2.0% |
| Training rows | 8,611 |
| Features | 48 |
| Interval reference | 80.2% coverage, median width 94% |
| Model version | sp10-a2-refined |
The band is a conformalized quantile regression (CQR) interval: independently trained P10/P90 models, cross-fitted nonconformity scores, Duan smearing after the log-space prediction. The display clamp only ever widens the band to contain the point estimate.
Faithfulness to the production app
This Space runs the same model as the full production app (bitsnaps.github.io/smartphone_pricing):
model.onnxis converted directly from the shipped tree dumps of the production engine (byte-faithful; base values baked in)- feature engineering in
engine.jsis a 1:1 port of the production TypeScript module - verified by the same two gates: two byte-exact golden cases (frozen clock) and 12 Python-exported parity fixtures within 0.1% — executed through the real ORT-web session in a real browser
Files
index.html— self-contained frontend (embedded model metadata, no build step)engine.js— feature engineering + post-processing (ported from the production app)model.onnx— XGBoost sp10 → ONNX (point / q10 / q90 outputs, shared 48-float input)
Data
Dataset: bitsnaps/dz-smartphone-pricing — cleaned marketplace listings + retail storefront reference, collected from multiple public sources covering the Algerian phone market (sources intentionally not attributed).
Predictions are list-price hints, not an official valuation.