Skip to content

Commit

Permalink
Merge pull request #33 from robmarkcole/main
Browse files Browse the repository at this point in the history
Pass n_clusters to KMeans
  • Loading branch information
yotarazona authored Oct 16, 2024
2 parents 885fff6 + 7763f3a commit 2a4d21b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scikeo/rkmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def rkmeans(image, k, nodata = -99999, **kwargs):
if np.isnan(np.sum(arr)):
arr[np.isnan(arr)] = self.nodata

kmeans = KMeans(**kwargs) # max_iter=300 by default
kmeans = KMeans(n_clusters=k, **kwargs) # max_iter=300 by default
kmeans.fit(arr)

labels_km = kmeans.labels_
Expand Down

0 comments on commit 2a4d21b

Please sign in to comment.