Skip to main content

I have two parts of a multidimensional data set, let's call them traintrain and testtest. And I want to built a model based on the train data set and then validate it on the test data set. The number of clusters is known.

I tried to apply kmeansk-means clustering in R and I got an object that contains the centers of clusters: kClust <- kmeans(train, centers=N, nstart=M);

kClust <- kmeans(train, centers=N, nstart=M)

Is there a function in R that takes the centers of clusters that were found and assigns clusters to my test data set?

What are the other methods/algorithms that I can try?

Thank you

I have two parts of a multidimensional data set, let's call them train and test. And I want to built a model based on the train data set and then validate it on the test data set. The number of clusters is known.

I tried to apply kmeans clustering in R and I got an object that contains the centers of clusters: kClust <- kmeans(train, centers=N, nstart=M);

Is there a function in R that takes the centers of clusters that were found and assigns clusters to my test data set?

What are the other methods/algorithms that I can try?

Thank you

I have two parts of a multidimensional data set, let's call them train and test. And I want to built a model based on the train data set and then validate it on the test data set. The number of clusters is known.

I tried to apply k-means clustering in R and I got an object that contains the centers of clusters:

kClust <- kmeans(train, centers=N, nstart=M)

Is there a function in R that takes the centers of clusters that were found and assigns clusters to my test data set?

What are the other methods/algorithms that I can try?

Source Link
user2598356
  • 329
  • 1
  • 2
  • 3

Is there a function in R that takes the centers of clusters that were found and assigns clusters to a new data set

I have two parts of a multidimensional data set, let's call them train and test. And I want to built a model based on the train data set and then validate it on the test data set. The number of clusters is known.

I tried to apply kmeans clustering in R and I got an object that contains the centers of clusters: kClust <- kmeans(train, centers=N, nstart=M);

Is there a function in R that takes the centers of clusters that were found and assigns clusters to my test data set?

What are the other methods/algorithms that I can try?

Thank you