0
$\begingroup$

I have a time series of fuel data which are split into distinct clusters (as shown in the image below. I'm looking at the green line). The clusters almost always have a descending gradient. I would like to identify these clusters programmatically (I'm using python). Are there any statistical methods I can use to do this?

Many thanks for any hints.

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

Looking at the plot, I get the impression that the straight, noisyless parts between the clusters are caused by missing data: the last data point of one cluster seems to be connected with the first data point of the next cluster.

If so, you just need to look at adjacent data points. If the temporal distance is above some threshold, then there is a cut between two clusters.

If you wonder how to find a good threshold: collect the temporal distances between adjacent data points. These will consist of a cluster of small values (i.e. all within-cluster-distances) and relatively large outliers (i.e. the between-cluster-distances)

$\endgroup$
1
  • $\begingroup$ Yes, the missing data is when the vehicle ignition is off. I'll try the temporal method, thanks. $\endgroup$ Jun 24, 2023 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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