I used the statistical technique called Median Absolute Deviation to determine sessions in my Ganbarometer script (still broken, sadly, dunno if I’ll ever be able to get back to it).
It’s pretty straightforward and worked quite well in practice. It does require one magic number (I can’t remember if I stuck with 2.0, but the source is on github – I’m about to board a plane and don’t have time to check).
Great article about the technique here: Data science: Use median absolute deviation instead of z-score to detect outliers
If it’s not clear: The way I used it is to first create a list of interval times (for each day or whatever). Each interval is the time from the start of one review record to the next review’s start.
Then I used MAD to find the outliers that were too long and marked them as the start of a new session.
Worked very well for me.