@@ -168,36 +168,20 @@ alternatively one can use `rand` to choose random points for init.
168168
169169A `KmeansResult` structure representing labels, centroids, and sum_squares is returned.
170170"""
171- <<<<<< < HEAD
172- function kmeans (alg:: AbstractKMeansAlg , design_matrix, k;
173- weights = nothing ,
171+ function kmeans (alg:: AbstractKMeansAlg , design_matrix, k; weights = nothing ,
174172 n_threads = Threads. nthreads (),
175173 k_init = " k-means++" , max_iters = 300 ,
176174 tol = eltype (design_matrix)(1e-6 ), verbose = false ,
177175 init = nothing , rng = Random. GLOBAL_RNG, metric = Euclidean ())
178176
179- ====== =
180- function kmeans (alg:: AbstractKMeansAlg , design_matrix, k, weights = nothing ;
181- n_threads = Threads. nthreads (), k_init = " k-means++" , max_iters = 300 ,
182- tol = eltype (design_matrix)(1e-6 ), verbose = false , init = nothing , metric= Euclidean ())
183-
184- # Get dimensions of the input data
185- >>>>>> > Moved metric internally as a positional arg
186177 nrow, ncol = size (design_matrix)
187178
188179 # Create containers based on the dimensions and specifications
189180 containers = create_containers (alg, design_matrix, k, nrow, ncol, n_threads)
190181
191- <<<<<< < HEAD
192- return kmeans! (alg, containers, design_matrix, k, weights, n_threads = n_threads,
193- k_init = k_init, max_iters = max_iters, tol = tol,
194- verbose = verbose, init = init, rng = rng, metric = metric)
195- ====== =
196- # Dispatch based on the specified algorithm
197182 return kmeans! (alg, containers, design_matrix, k, weights, metric;
198183 n_threads = n_threads, k_init = k_init, max_iters = max_iters,
199- tol = tol, verbose = verbose, init = init)
200- >>>>>> > Moved metric internally as a positional arg
184+ tol = tol, verbose = verbose, init = init, rng = rng)
201185
202186end
203187
0 commit comments