What if you have data with chronology, i.e. it was recorded over a time period that needs to be considered? This is an interesting thing I have fiddled with. If you have any more mathematical ideas related to this, then please tell me in the comments! This is just a draft, so please tell me if there is something I can improve or add here.