# NOT RUN {
library(cuml)
library(mlbench)
data(Vehicle)
vehicle_data <- Vehicle[order(Vehicle$Class), which(names(Vehicle) != "Class")]
ctx <- cuml_rand_proj(vehicle_data, n_components = 4)
set.seed(0L)
print(kmeans(ctx$transformed_data, centers = 4, iter.max = 1000))
# }
Run the code above in your browser using DataLab