### Example 1: Simple usage with circles dataset
result1 <- genetic_kmeans(db1[1:20,], 2, learn = TRUE, waiting = FALSE)
### Example 2: Moons dataset with different population size
result2 <- genetic_kmeans(db2[1:20,], 2, population_size = 20,
learn = TRUE, waiting = FALSE)
### Example 3: Varying density clusters with different mutation probability
result3 <- genetic_kmeans(db3[1:20,], 3, mut_probability = 0.7,
learn = TRUE, waiting = FALSE)
### Example 4: Well-separated clusters with larger population
result5 <- genetic_kmeans(db5[1:20,], 3, population_size = 30,
mut_probability = 0.6, learn = TRUE, waiting = FALSE)
### Example 5: Using different parameters combinations
result6 <- genetic_kmeans(db1[1:20,], 2,
population_size = 15,
mut_probability = 0.8,
max_generations = 15,
learn = TRUE,
waiting = FALSE)
Run the code above in your browser using DataLab