Define targets and metrics
Choose what to detect (e.g. high NO2, sensor fault) and measure latency, memory and F1 or precision/recall depending on the cost of false alarms.
Monitor urban environment. Assess resource and latency tradeoffs.
Smart city environmental monitoring uses sensor telemetry and lightweight models to detect events or anomalous conditions at the edge. Real deployments must balance latency, memory and power while handling missing sensors, drifting calibrations and intermittent connectivity.
Learning concept · Not a validated service
Smart city environmental monitoring uses sensor telemetry and lightweight models to detect events or anomalous conditions at the edge. Real deployments must balance latency, memory and power while handling missing sensors, drifting calibrations and intermittent connectivity.
A proposed application: flag air-quality or noise-threshold breaches to city operators, with human validation before any regulatory action. The supplied starter does not connect to real sensors or produce operational alerts.
Choose what to detect (e.g. high NO2, sensor fault) and measure latency, memory and F1 or precision/recall depending on the cost of false alarms.
Collect or synthesise time-aligned sensor readings, label events, and simulate missing values and noise before splitting train/validation/test.
Train an interpretable model suitable for edge devices and measure single-sample latency, model size and node count.
Define on-device checks, remote health telemetry and drift detection so humans can inspect and roll back model changes.
The supplied starter generates a synthetic binary classification dataset with sklearn.make_classification, fits a DecisionTreeClassifier, measures repeated single-sample predict latency, and prints basic model stats (depth and node count). It does not ingest sensor telemetry, simulate edge hardware, or implement MQTT or on-device runtime.
X, y = make_classification(n_samples=1000, n_features=12, n_informative=8, random_state=42)
model = DecisionTreeClassifier(max_depth=6, random_state=42)
model.fit(X, y)
sample = X[:1]
start = time.perf_counter()The starter uses synthetic features from make_classification rather than real sensor telemetry and therefore cannot validate environmental detection performance. It also measures latency on the host Python process rather than on an edge device runtime or with quantised/compiled model formats.
A proposed extension: replace synthetic data with a short deployed telemetry collection from a few sensors, train a compact model, and stream predictions via MQTT to a dashboard where operators verify alerts.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its Network Engineering Course, with placement support and hands-on labs.