r/pytorch

▲ 2 r/pytorch+1 crossposts

Sparse panel data, a small experiment

Quite a few real world data problems look like this: many related time series, few noisy readings, and long gaps. Local price indices, sensor networks, or small area stats.

I built a small PyTorch model to estimate a smooth underlying level for every location, day, and target even where nothing was observed.

Key ideas:

Mask, don’t drop missing targets in the loss

Weight observations by how many raw readings they average

Share information across locations (area + station offsets) and across related targets (joint heads)

Enforce smoothness with a curvature penalty over the full time grid, including gaps

I tested it on hourly PM2.5/PM10 from 12 Beijing stations, thinned to a sparse panel, and scored against the full data’s 31day moving average.

What I found:

The network fills long gaps and very sparse stations far better than smoothing each series on its own

Modelling both pollutants together recovers a completely dropped series (PM10 at one station) from its PM2.5

But elsewhere, sharing across targets costs a little accuracy vs. modelling each pollutant alone

A simple ±15day mean is hard to beat when data is dense. The network’s smooth time curve misses shared daily shocks

Writeup with code, figures, and results:

https://prteek.github.io/regression_room/posts/beijing_air_quality/

reddit.com
u/Far-Media3683 — 6 days ago

Rethinking pytorch

Hoping for some feedback. First off It goes without saying Pytorch is one of the greatest pieces of software of our time, a fundamental block for AI. However there are a few problems and limitations that are ripe for innovation. Pytorches is a concept which is meant to solve several problems with pytorch

  1. Simplify install for GPUs (no GPU specific install steps)
  2. Support Multi GPUs of different vendors natively on one install
  3. Split of workload based on available GPUs, prioritizing based on GPU capability
  4. Backward compatible with pytorch ish

https://github.com/tonyt123456/pytorches

u/Frequent_Big7927 — 7 days ago