Created
December 23, 2019 16:14
-
-
Save briverse17/c04b86eaf7a3aeceaa529726738c799f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initMedoids(self, X): | |
''' | |
Parameters | |
---------- | |
X: input data. | |
''' | |
self.medoids = [] | |
#Starting medoids will be random members from data set X | |
indexes = np.random.randint(0, len(X)-1,self.k) | |
self.medoids = X[indexes] | |
for i in range(0,self.k): | |
self.medoids_cost.append(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment