Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Feature Engineering for Sensor Telemetry: Windowing, Rolling Stats, and the Leaks That Fool You

The most common reason an IoT model looks great offline and useless in production is not the model. It is the features — specifically, the difference between how features were computed in the notebook and how they are computed on the gateway. This post covers windowing, rolling statistics, gap handling, and the leakage patterns that quietly inflate offline metrics. All the code is plain Python…

Many IoT models perform well offline but fail in real-world production due to feature computation discrepancies. This article discusses windowing, rolling statistics, gap handling, and leakage patterns that inflate offline metrics. The code presented is in plain Python with NumPy, ensuring readability for those porting the features to C. Telemetry is not a simple table; it has properties that break traditional table assumptions.

Irregular arrival, gaps, non-monotonic time, and multiple rates are common issues that can corrupt rolling window calculations if performed on row indices rather than time.

To address these issues, the article introduces window types and their appropriate use cases. Tumbling windows provide fixed-duration non-overlapping intervals, while sliding windows offer overlapping intervals with lower detection latency. For alerting, a sliding window with a hop of 10-25% of the window length is recommended. The article also explains time-based resampling onto a fixed grid, keeping last values in duplicated buckets and handling missing buckets as explicit NaNs. This approach ensures accurate downstream rolling calculations.

The author provides a simple implementation of rolling statistics (mean and standard deviation) using a time-ordered stream, which can be implemented with O(1) per sample complexity. This is crucial for devices with limited computational resources. Additionally, the article emphasizes the need for robust features in industrial signals, recommending the use of median and interquartile range instead of mean and standard deviation, as the latter are sensitive to outliers.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

The New Model Is Cheaper. Testing It Isn't.

In September a new generation of the model behind one of the services I maintain came out. On the same cases, its small tier cost almost half as much per classification as the one in production.

  • New model costs less than half per classification
  • Testing swap took 47-65 dollars of model tokens
  • Savings recoup test costs in about two years

Suppression Before SMS OTP or Email OTP Fallback (SaaS Construction Site Login)

Use SMS OTP as the primary second factor for construction-access SaaS login, and make email OTP recovery conditional on a durable recipient-suppression check. The deciding constraint for a developer-tools team serving US/EU sites is integration effort: a managed SMS verification path removes code-lifecycle work, while an email recovery…

  • Prioritize SMS OTP over email OTP for SaaS construction site login.
  • Maintain separate records for recipient suppression and OTP validity.
  • Use Infrai's REST API for SMS verification and email suppression.

10 gadgets revolutionising classroom learning

From tablets to interactive whiteboards, these classroom learning gadgets are changing how teachers teach and students learn, with practical benefits and l Read More: https://punchng.com/10-gadgets-revolutionising-classroom-learning/

More from Thursday 26 November →