4 ms·
A nice trick to detect anomalies in an array of arbitrary data is to make N subarrays (each with different size(array)/N elements removed) and compress each of
by ajuc 6y ago
A nice trick to detect anomalies in an array of arbitrary data is to make N subarrays (each with different size(array)/N elements removed) and compress each of them.
The subarray that compresses the most has the anomaly removed.
It's not very cheap, but it's much more general than median or average or string comparisons. It relies on the fact that compressed size is estimate of Kolmogorov complexity.