I am new to clustering. My apology if this has been asked before.
I'd like to differentiate two distinct linear populations within sample matrix, and tag them differently. Apparently k-means couldn't do a good job, which is shown in the plot below. Does anybody have any good suggestion?
Example code:
x <- c(1:1000)
y <- x
y2 <- 10 * x
sample <- matrix(c(x, x, y, y2), nrow = 2000)
Thanks a lot!