I am doing my first assignment in Data Science (Masters level) and do not come from a programming background. I have completed a K-Means model on my data (which is a a simple test data set). But now I want to implement bisecting k-means in order to show how this can improve the clustering result. I am coding in R, does anyone have any knowledge on how to code bisecting k-means in R, for someone who is fairly new to the field?
The code I am trying to use is:
bkmeansset <- ml_bisecting_kmeans(x, formula = NULL, k = 3, max_iter = 20,
seed = NULL, min_divisible_cluster_size = 1, features_col = "features",
prediction_col = "prediction", uid =
random_string("bisecting_bisecting_kmeans_"))
I am inputting a test set called "testset" and I am not sure where to but this in the argument of the function. The error message that I am getting is:
Error in UseMethod("ml_bisecting_kmeans") :
no applicable method for 'ml_bisecting_kmeans' applied to an object of class
"character"