1
$\begingroup$

I have several variables to include in k-means, some of them are percentages (between 0-1) and some of them are numerical variables (positive values). I know normalisation is required when the variables are in different scales, so they are all in comparable ranges.

My question: since some of the variable are already between values 0-1 (the percentages), should I only normalise the other variables and leave the percentages as they are? or should I normalised the percentages too? (not sure if that would make sense).

I found several posts (for example: k-means clustering on percentages) but still not sure how to proceed... I really much appreciate your help. Thanks!

$\endgroup$
6
  • $\begingroup$ Try to visualize your data first (say, a matrix bivariate scatterplots). I recommend you also to consider transforming the proportions into logits, to see if clusters appear more pronounced. And yes, it is a reasonable idea - to standardize the variables. $\endgroup$
    – ttnphns
    Commented Jun 29, 2016 at 9:24
  • $\begingroup$ @ttnphns Thanks for your comment. I have 4 vbles giving the % of X consumption during the day (f ex: 5% in the morning, 40% day, 45% evening, 10% night) as I want to see if there are clusters according to the distribution of X (among other vbles). So, I would like to see if there is a cluster which groups together those individuals with a high night consumption for instance. I am not entirely sure how I would interpret the logit transformation though... As for the standarisation, do you mean to standarise all variables (including the %)? $\endgroup$
    – goyiki
    Commented Jun 29, 2016 at 9:46
  • $\begingroup$ Yes, all variables. Why not? If V1 is percentage and V2 is dollars (say), how one should "compare" if he needs to compare? Only some way of rescaling/standardizing/normalizing could help. $\endgroup$
    – ttnphns
    Commented Jun 29, 2016 at 9:56
  • $\begingroup$ @ttnphns. If V1, V2, V3, V4 are percentages (being V1+V2+V3+V4 =1) and V5 is dollars. Would it be possible to standarise V5 (so it goes from dollars to [0-1]) and leave the other 4 variables as they are (since they already are between [0-1])? As I mentioned to HelloWorld, my fear is that if I normalise all of them I will be loosing the relationship/proportion of V1-V4. What do you think? $\endgroup$
    – goyiki
    Commented Jun 29, 2016 at 10:01
  • $\begingroup$ (I'm not in your shoes (know not details of your study), so you're warned.) In situation described in your last comment, I probably would discard any one of the 4 percentage variables as "redundant" in clustering (since they sum to a constant). Then I probably would z-standardize (to mean 0, st. dev. 1) all 5 variables. I would probably also do the analysis with logits (discard -> logits of proportions -> z-standardize) and see if the results are better in some respect. $\endgroup$
    – ttnphns
    Commented Jun 29, 2016 at 10:12

1 Answer 1

0
$\begingroup$

I would apply feature scaling independently to each variable. This is because if, for example, your percentages vary between .55 and .85 with feature scaling you'd still cover the whole range, because .55 would become your zero and .85 your one.

$\endgroup$
6
  • $\begingroup$ Thanks for your answer! I see what you mean, so if I have a variable that has values between 0.1-0.5 and another that has values between 0.4-0.8 I would reescalate them so they both would be between 0-1. But I don't understand why? They are already percentages (they are not vbles in different units), the difference between 0.1 and 0.2 or 0.8 and 0.9 is 10% in any case. $\endgroup$
    – goyiki
    Commented Jun 29, 2016 at 9:56
  • $\begingroup$ My fear is that with the reescalation I lose some information... As I mentioned in the comment to ttnphns, I have 4 vbles that give the % of something and they all together add to 100%. If I normalise them, then I am loosing that proportion between them, as they won't add 100% anymore. Does it make sense to you? $\endgroup$
    – goyiki
    Commented Jun 29, 2016 at 9:56
  • $\begingroup$ yes it does. I would proceed as ttnphns suggest, with standardization of all 5 variables. If you do not do that you'll keep some information about your grouping already, and your clusters would probably reflect the groups you already have. A strategy I use often to check the influences of various variables in clustering is to plot the parallel coordinates of the clustering results. In my opinion this gives a very good idea of which variable is contributing the most to the grouping because you can scale one or more variable at the time and check what's the effect of the scaling/standardization. $\endgroup$
    – HelloWorld
    Commented Jun 29, 2016 at 10:27
  • $\begingroup$ ,, thanks for you reply. What do you mean by "to plot the parallel coordinates"? It sounds like a good strategy to check which variables influence more in the clustering, but I don't know how to do what you said. Could you please explain this a bit more? Thanks in advance! $\endgroup$
    – goyiki
    Commented Jun 29, 2016 at 10:51
  • $\begingroup$ The wikipedia intro to parallel coordinates is short and to the point. If you are familiar with R you can plot parallel coordinates with the parcoord command from the MASS package $\endgroup$
    – HelloWorld
    Commented Jun 29, 2016 at 11:06

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.