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
import random | |
import numpy as np | |
from scipy.spatial.distance import euclidean, hamming, cityblock | |
from sklearn.datasets import make_classification, make_circles, make_blobs | |
from sklearn.base import BaseEstimator | |
class KMeans(BaseEstimator): | |
"""K-Means is an unsupervised learning method for clustering unlabeled data. | |