title: How to find period in time series – with fuzziness?
body: <p>Given a set of timestamps, I want to find a periodic grid most of them fall into. </p>
  
  <p>Example set that falls into a grid with a period of 30:</p>
  
  <pre><code>10, 40, 72, 99, 164, 172, 190
  </code></pre>
  
  <p>Three fuzziness parameters here:</p>
  
  <ol>
  <li>small deviation (72->70, 164->160) is acceptable;</li>
  <li>some amount of samples (172) fall out of the grid. Their acceptable percentage is also set by some parameter;</li>
  <li>sample around 130 is skipped, but is also ok. Acceptable amount of "holes" can also be somehow set.</li>
  </ol>
  
  <p>Looking at intervals between the samples, I can think of searching for the greatest common divisor (GCD), again, with some fuzziness.</p>
  
  <p>Please advice an approach to this problem.</p>