1
$\begingroup$

I'm using 'NbClust' package to help me to get the "optimal number of clusters" and I noticed in my dataset I have attributes with different importance.

I have 5 attributes: x1,x2,x3,x4,x5 and I know that the attributes x5 must have the same value in a cluster and the attribute X4 have more importance than X1 and X3.

I'm using Euclidean distance and I normalized the data in order to have values between 0 and 1. I'm also using "One-Hot Encode Data" method in attributes x4 and x5

What should I do in these situations? How can I give more importance to specific attributes?

Thanks.

$\endgroup$
1
  • $\begingroup$ How do you know these things? $\endgroup$
    – Peter Flom
    Apr 19, 2019 at 11:13

2 Answers 2

0
$\begingroup$

To increase the weight of attributes, scale them.

It's easy to see that with Euclidean distance this increases the importance of attributes.

But there is no "right" way of scaling the data. Squeezing everything to [0;1] is usually almost as bad as not scaling though.

$\endgroup$
2
  • $\begingroup$ What scale do you suggest? Make sense to scale x1,x2,x3 to [0,1] and x4 and x5 to [1,2]? Thanks @Anony-Mousse $\endgroup$
    – Marcus
    Apr 18, 2019 at 11:41
  • $\begingroup$ Obviously scaling to [1;2] is equivalent to scaling to [0;1]. So it must not make a difference. Weight attributes as you consider it meaningful for your problem. $\endgroup$ Apr 18, 2019 at 17:47
0
$\begingroup$

Fact is that there doesn't exist any good "push button" solution to cluster analysis. It is an explorative technique, meaning that you have to try different methods and parameters and analyze the result.

The reason is that in many applications you can choose these values intuitively if you have understood your data well enough. E.g. when working with Geo data, distance is literatlly in kilometers, and it allows me to intuitively specify the spatial resolution. Similarly, minpts gives me an intuitive control over how "significant" a subset of observations needs to be before it becomes a cluster.

And in the end go and try out stuff. It's data exploration, not "return(truth);". There is not "true" clustering. There are only "obvious", "useless" and "interesting" clusterings, and these qualities cannot be measured mathematically; they are subjective to the user.

$\endgroup$

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