Skip to content

Commit

Permalink
Revert "make centroid indices attribute"
Browse files Browse the repository at this point in the history
This reverts commit 02857e6.
  • Loading branch information
HellevdM committed Apr 9, 2024
1 parent 21638a1 commit ffcd60b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qsprpred/data/chem/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ def _get_centroids(self, fps: list) -> list:
"""
self._set_nClusters(len(fps))
picker = rdSimDivPickers.MaxMinPicker()
self.centroid_indices = picker.LazyBitVectorPick(
centroid_indices = picker.LazyBitVectorPick(
fps,
len(fps),
self.nClusters,
firstPicks=self.initialCentroids if self.initialCentroids else [],
seed=self.seed if self.seed is not None else -1,
)

return self.centroid_indices
return centroid_indices


class FPSimilarityLeaderPickerClusters(FPSimilarityClusters):
Expand All @@ -247,8 +247,8 @@ def _get_centroids(self, fps: list) -> list:
Get cluster centroids with LeaderPicker algorithm.
"""
picker = rdSimDivPickers.LeaderPicker()
self.centroid_indices = picker.LazyBitVectorPick(
centroid_indices = picker.LazyBitVectorPick(
fps, len(fps), self.similarityThreshold
)

return self.centroid_indices
return centroid_indices

0 comments on commit ffcd60b

Please sign in to comment.