Created
December 23, 2019 16:10
-
-
Save briverse17/3810f5d339470ab12ff3d58ad256c15f 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
class k_medoids: | |
def __init__(self, k = 2, max_iter = 300, has_converged = False): | |
''' | |
Class constructor | |
Parameters | |
---------- | |
- k: number of clusters. | |
- max_iter: number of times centroids will move | |
- has_converged: to check if the algorithm stop or not | |
''' | |
self.k = k | |
self.max_iter = max_iter | |
self.has_converged = has_converged | |
self.medoids_cost = [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment