Skip to content

Commit

Permalink
Fix k-means++ mini-batch initialization (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
borchero authored Jun 17, 2022
1 parent 1eb6af0 commit 1f73128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycave/clustering/kmeans/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def fit(self, data: TensorLike) -> KMeans:
batch_size=self.batch_size or len(data),
collate_fn=collate_tensor,
)
is_batch_training = self._num_batches_per_epoch(loader) == 1
is_batch_training = self._num_batches_per_epoch(loader) > 1

# First, initialize the centroids
if self.init_strategy == "random":
Expand Down

0 comments on commit 1f73128

Please sign in to comment.