I have data which contains access duration of some items.

t0~t5 is the access time duration, 1 means the items was accessed in the time duration, 0 means it wasn't.


Objective: Find sets which are all 1 for a continuous duration as longer as possible.

I can set the minimum continuous length len=2.

If len==2, what I want is groups ID=0,1

ID=3,4 aren't because their len is 2 but ID=0,1` are more continuous than them.

For clustering:

I tried KMeans and DBSCAN, they all cluster ID=3,4 as one group and it makes sense. But it doesn't do what I want.

For regression:

Although I can predict which ID will be access, I still find the longer continuous time-series.

For classification:

I don't have label it to identify which ID will be what I want.

I try above algorithm but didn't figure out, I thought possible way is pre-processing before clustering and find out after clustering.

Is there any possible pre-processing of data to reach what I want ? Or any ways to help me?


You need to clarify your objective. Why do you want 0, 1 instead of 3, 4? Both matches have the same number of matches and both end with usage at t5. Both “turn on” roughly together. If you can’t clarify the difference, you won’t find an algorithm to give an answer,

Also, how are you accounting for the sequential nature of your data? Regular clustering will consider t0, t1. Etc to be independent, but that’s not how you are looking at the problem. This is related to your question about method and also your question about preprocessing.

I don’t know your actual criteria, but do you consider 0, 0, 1 to be different from 1, 0, 0? If so, how could you encode your data so that those two are different in a way that reflects your objective?

  • $\begingroup$ thx, I update the objective and some detail. Cluster consider to, t1 etc to be independent is ok because to and t1 and else are different time duration. ex: to for 0~10min, t1 for 10~20min. $\endgroup$ – code_worker Apr 3 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.