I have a huge amount of time series data, each representing some observations at a certain position. Thus of course there exists spatial correlation. I am trying to reorganize these lines of observations to make it as smooth as possible, such that it could be efficiently encoded with an image compressor.
Here the strange thing happens, I reorder these lines with a brute-force algorithm, to minimize the L1-norm between adjcent lines, in a greedy manner, and the 2d “image” does look more smoothier. However, when comes to compression, it performs only slightly better than a random shuffle, and is far worse then the “natural” order, a zig-zag scan of the observed sites.
The compression ratio is like that (original floating values, ranging from -200 to 200, are enlarged 100 times before converting to integers, they are all encoded with libjxl in loseless mode, the effort level has minor influences):
- natural, spatial zig-zag order, 29%
- Minimized delta L1-norm, 34%
- Random shuffle, 36%
And these are the images
I have tried different parameters for the libjxl, and different norms to measure the delta between observation lines. I scrutinized the details of the “2d observation image”