1
$\begingroup$

I have a time series where the x-axis represents hour of the day and the y-axis represents the avgerage value of some variable, say speed of all the cars in New York. I want to bucketise this data (or say cluster) on their Y-axis value. How can I decide the optimal number of buckets and what parameters should I consider to find out these optimal buckets. One simple way might be to bucket according to the speed range like 0-20 miles per hour is bucket 1, 21-30 is bucket 2, and so on. But I want to decide these ranges using the time-series.

$\endgroup$
  • 3
    $\begingroup$ What is the purpose of the intended clustering? What kind of insight or information do you hope it will give? (We need to know because there are many kinds of clustering: they are used for different purposes and are interpreted in varying ways.) $\endgroup$ – whuber Jan 7 '12 at 15:28
  • $\begingroup$ i want to use the bucket value as a parameter to prediction model (let's say tax value of a particular car ) along with several other parameters like cost of car, type of car, etc.. $\endgroup$ – Amit Jan 7 '12 at 18:59
  • 4
    $\begingroup$ Why bucket at all? If it's because you doubt a linear relationship between X and Y, you can plot the data and guess at a functional form, or consider more formal alternatives, e.g., nonparametric regression. $\endgroup$ – jbowman Jan 7 '12 at 19:17
2
$\begingroup$

If you want to cluster your data and don't know how many clusters you need, see this answer, including this Wikipedia article:

And there is also this question: How to define number of clusters in K-means clustering?

$\endgroup$

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.