# Knime Clustering

I want to do clustering with knime. The data I have is suitable for unsupervised learning. My data set is numerical data consisting of examining 100 different products in terms of 10 criteria. At the same time, these 10 criteria have criterion weights, so the criteria we will consider when clustering have priority. As far as I have learned from online lessons, I can group products using the k-means algorithm. But I can’t figure out how to take into account criterion weights. Can you help with this?

Hi cerenduman and welcome to Knime hope you will enjoy it. Just trying to understand…you have 10 variables and you want to add more importance (weights) to one variable when doing the clustering?

cheers

Mau

2 Likes

Yes. The 10 criteria have different degrees of weight. I want to cluster accordingly.
Thank you

Hi, cerenduman please find attached a workflow with half of the solution. But first some assumptions:

A. I am using 3 variables, X, Y and Z
B. The weighs must add 100%
C. The variables are already normalized

1. I used the min max normalization approach

2. I “played” with the min and maximum scale of the min max normalization method, so assuming that if an already normalized variable can be twice as important as another the min-max scale can be modified from 0- 1 to 0-2. In this case Y is twice as important as X.

3. With the third variable I can say that Z is three times more important than X so the min max scale can be changed to 0 to 3. At the same time Z is 1.5 more important than Y.

4. Then “I” solved the equation to determine the weights

So X is 17%, Y is 33% and Z is 50%.

In summary

As I mentioned the problem is 50% solved as in the real life you have the weights and then you need to setup the scales.

Cheers

Mau

Different Weight.knwf (1.1 MB)

5 Likes

Thank you for your answer, but I guess that’s not exactly what I want to do. Considering that the criteria have clear and different weight values such as 0.05 0.17 0.3 0.06 how can we do this clustering?

Hi cerenduman, please find attached the workflow where I modify the scales for the Min-Max normalization method. Basically I converted the weights into a 0-100% scale and then used this to calculate the Min-Max scale.

Different Weight 2.knwf (3.1 MB)

Weights.xlsx (10.6 KB)

I beg if someone else can validate this approach or propose another one.

Let me know if you need something else

Best Regards

Mau

4 Likes