I have a list of customer payment dates and I'm looking to see if there is a 7/14 day or monthly pattern to the payments, often there is!. The problem is that there can also be intermediate payments of similar value, so just looking at the time between payments doesn't always work. Is there any simple approach (using SQL or R) that can help me classify customers as weekly or monthly payers?
Seems like a very simple signal processing problem but perhaps I don't know the right words to google as I can't find anything. Any pointing me in the right direction would be appreciated!
Example data:
CustomerID Payment Date
Customer1 2017-01-05
Customer1 2017-01-06
Customer1 2017-01-12
Customer1 2017-01-17
Customer1 2017-01-19
Customer1 2017-01-19
Customer1 2017-01-26
Customer1 2017-02-02
Customer1 2017-02-03
Customer2 2017-06-04
Customer2 2017-06-06
Customer2 2017-07-04
Customer2 2017-07-06
Customer2 2017-07-22
Customer2 2017-07-28
Customer2 2017-08-06
Example Output
CustomerID Classification
Customer1 Weekly
Customer2 Monthly
Edit: Just to be clear, the data is generally much larger and can be noisier than above. I was just looking for general ideas for algorithms that find patterns, not to try solve the problem for the small dataset I've posted.