Using partitioned k-Means

Asked

Viewed 13 times

1

Good afternoon. I have a date-set with 5,700 observations, one of the variables is "note", where it varies from 0 to 10 for each observation. I wonder if it is possible to run k-Means, using Rstudio, as follows: create 09 clusters so that the note 2.68 is the center, dividing 04 clusters above that note and 05 clusters below that note.

In reality what I did was to divide the base into two parts, base "a" and base "b": a<-base_mod_final_kn%>% filter(score_comp >= 0 & score_comp < 2.63) b<-base_mod_final_kn%>% filter(score_comp >= 2.63 & score_comp <= 10)

Soon after, I ran k-Means in both parts: k_a <- kmeans(a$score_comp, 5, iter.max=10, nstart=5) k_b <- kmeans(b$score_comp, 4, iter.max=10, nstart=5)

Then I put the bases back together. This solved my problem, but I wonder if there would be an alternative method that we use only k-Means without having to partition the base.

  • Could you post some lines of the dataset (just to get an idea of how the data is structured) ? Could add a tag listing which program you are using to do operations?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.