I need to cluster a matrix which contains zero values. I am clustering three separate sets of 24 values. The first two are non-zero and represent hourly ambient temperature (in K) and electrical demand. The third includes zero values as it represents the hourly amount of solar radiation. At night there is no sun and hence the values are zero.

  1. Is K-medoids / partitioning around medoids (PAM) appropriate for this kind of data?
  2. Would shifting all data upwards (for instance by a small value like 0.1 such that no zero values exist anymore) be a solution?
  • $\begingroup$ Applying a median to a predictor with many zeros will result in an uninformative, undiscriminating number of metrics. More information needs to be included describing your data. How many metrics are you clustering? How zero-heavy are they? What is the distribution of means and std devs? $\endgroup$
    – user234562
    Apr 28, 2020 at 16:22
  • $\begingroup$ @user332577 thanks for the feedback! Updated the original question. $\endgroup$
    – Martin
    Apr 28, 2020 at 16:41
  • $\begingroup$ If you scale your variables, one of the first division (or cluster formed) you will see is the zero from non-zeros, i.e day and night. Is this useful for what you wanna do? $\endgroup$
    – StupidWolf
    Apr 28, 2020 at 18:02
  • $\begingroup$ otherwise, just cluster the day and night data separately. $\endgroup$
    – StupidWolf
    Apr 28, 2020 at 18:03
  • $\begingroup$ I would like to cluster entire 24h periods which include both zero and non-zero radiation and varying temperature. Does that make sense? $\endgroup$
    – Martin
    Apr 28, 2020 at 20:06


Your Answer

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

Browse other questions tagged or ask your own question.